Linked List
Nodes joined by pointers — O(1) rewiring, no indexing, and a handful of pointer patterns.
This topic is part of Pro.
Free covers the C and Python courses, the first three DSA topics, the opening system design lessons and the beginner AI lessons, all with the full coach. Pro opens the rest of the library in the FollowtheDamnCode app.
What is in it
- 1How linked lists workNodes, next pointers, and why insertion is O(1) while finding index i is O(n). Pro
- 2Reversing a linked listThree pointers — prev, curr, next — flip one arrow at a time without losing the rest. Pro
- 3Fast and slow pointersOne pointer moves twice as fast — find the middle, detect a cycle, or hold a fixed gap. Pro
- 4Merging lists and dummy nodesA placeholder node in front of the head removes every "what if the head changes?" special case. Pro