Linked list
The notes
What is a linked list?
A linear collection of elements called nodes, which are not stored contiguously in memory but are linked together by pointers.
- The head points to the first node
- Each node holds data and a pointer to the next node
- The last node points to null
Anatomy of a node
- Data: stores the element value
- Pointer (or reference): holds the memory address of the next node
Key features
- Dynamic size: grows and shrinks as needed
- Efficient insertion/deletion: can add or remove nodes quickly
- Sequential access: elements are accessed one by one
- No random access: cannot directly access elements by index
Types of linked lists
- Singly linked list: each node points forward to the next
- Doubly linked list: nodes point both forward and backward (prev and next)
- Circular linked list: the last node's pointer points back to the first node
Data structures deck
Make them stick
Sign in to see every card full size, tick the ones you've got, come back to the rest later, and keep your own notes on each card.
Watch the lesson
Data structures, Lesson 5, from 0:46: Why Linked Lists?








