← Data Structures & Algorithms learning pathData Structures & Algorithms · Module 4 of 10
Linked lists
Use nodes connected by pointers.
📖 Key ideas
- Each node stores data and a pointer to the next node.
- Singly, doubly and circular linked lists.
- Insert/delete at a known position is O(1); search is O(n).
- No random access by index.
- Classic problems: reverse a list, detect cycle, find middle.
💡 Real-life example: A linked list is a treasure hunt: each clue tells you where the next one is.
NodeElement with data and pointer
HeadFirst node
Doubly linked listNodes point next and previous
CycleList loops back on itself