Linked List
beginnerA chain of nodes each holding a value and a pointer to the next; O(1) head insert, O(n) search.
List: 10 → 20 → 30 → 40. Set temp = HEAD. Traverse until temp.next is null to find the TAIL.
1 / 8
A chain of nodes each holding a value and a pointer to the next; O(1) head insert, O(n) search.
Category: data-structure
Difficulty: beginner
Time Complexity: O(n) search, O(1) insert-at-head
Space Complexity: O(n)
View Linked List VisualizationA chain of nodes each holding a value and a pointer to the next; O(1) head insert, O(n) search.
List: 10 → 20 → 30 → 40. Set temp = HEAD. Traverse until temp.next is null to find the TAIL.