Colors: Orange = Current Node, Green = Found/Success, Blue = New Node, Red = Deleted
Singly Linked List is a linear data structure where elements are stored in nodes, and each node contains data and a pointer to the next node.
Key Characteristics:
Why use Singly Linked Lists?
Common Applications:
Operation | Time Complexity | Space Complexity |
---|---|---|
Access | O(n) | O(1) |
Search | O(n) | O(1) |
Insert at Head | O(1) | O(1) |
Insert at Position | O(n) | O(1) |
Delete at Head | O(1) | O(1) |
Delete at Position | O(n) | O(1) |
Traversal | O(n) | O(1) |
Strengths:
Limitations: