🧮Linked List
Also known as Singly Linked List, Doubly Linked List
A chain of items. Each one holds a value and points to the next.
Think of it like
Think of it like a treasure hunt. Each note tells you where to find the next one.
Example
Jack's music app keeps the play queue as a linked list. Dropping a song from the middle just links its two neighbours together.
Why it matters
Definition
Common mistake
Key takeaways
- 1A chain. Each item points to the next.
- 2Fast to change. Insert or remove anywhere.
- 3Slow to reach. Walk from the start.