Skip to content
dsa/roadmap
← All chapters
Chapter 04Weeks 5–6Phase 2 ~2.8 h

Linked Lists

Pointers and the heap, then singly and doubly linked lists: insert, delete, search, traverse.

  1. 4.1Pointers, new/delete & the HeapA pointer holds an address. new asks the heap for memory that lives until you delete it. Master this and linked lists become easy. 45 minmedium
  2. 4.2Singly Linked ListNodes on the heap, each pointing to the next. Insert at front, end or a position, delete by value, search and traverse, plus the dummy-node trick and the classic pitfalls. 75 minmedium
  3. 4.3Doubly Linked ListEach node points both forward and backward. You can walk in both directions and delete a node knowing only its address, at the cost of one extra pointer per node. 50 minmedium

Keyboard shortcuts

⌘K /
Search topics, glossary, cheat sheets
space
Play / pause the visualizer
← →
Step back / forward
r
Reset the visualizer
?
Show this help