A linked list scatters its values across memory and stitches them together with pointers — trading random access for instant splicing.
1 Value + next
Each Node holds a value and a next pointer. That is the whole atom — no index, no container.
2 head is everything
The only named entry point. If a node is unreachable from head, the list has lost it for good.
3 None ends the chain
The last node’s next is None — walking until None is how every traversal stops.
4 Splice, don’t shift
Insert after a node = rewire two pointers, O(1). A Python list pays O(n) to shift everything right.
5 The price
No random access: the 5th value costs 4 hops. You walk from head every single time.
Node anatomy
Value + next1Each Node holds a value and a next pointer. That is the whole atom — no index, no container. head is everything2The only named entry point. If a node is unreachable from head, the list has lost it for good. None ends the chain3The last node’s next is None — walking until None is how every traversal stops. Splice, don’t shift4Insert after a node = rewire two pointers, O(1). A Python list pays O(n) to shift everything right. The price5No random access: the 5th value costs 4 hops. You walk from head every single time. 5 building blocks make up Node anatomy
Append 41, 17, 88, 5 — then walk curr to 88 and splice 63 in without losing the tail.
1 / 11head = None — an empty chain. Every Node is born with next = None.
One hunt, two writes — and the order of those two writes is the whole ballgame.
process decision input / output start / end Build a chain by hand and traverse it — then insert 63 into a sorted chain with a short hunt.
modulehead = Node(41) — __init__ runs: value = 41, next = None.
Memory
head= Node(41) → None
Console
output appears as the program runs…
Unlink 24 from 7 → 13 → 24 → 42 — two fingers, one write, no gap to close.
1 / 5Target: unlink 24. Two fingers walk the chain — prev trails curr from the head.
Point-chasing without a loop — and one classic None surprise.
Your predicted output — one line per console line
Hint: Chaining .next walks the pointers one hop at a time; the last node’s next is None, and print(None) shows the word — not nothing.
Click a term, then click its meaning to lock the pair.
8 conceptsTap a card to expand ?Nodedrops into place
?headdrops into place
?Nonedrops into place
?O(1) head insertdrops into place
?O(n) accessdrops into place
?curr = curr.nextdrops into place
?pointer order bugdrops into place
?prev + currdrops into place
01A linked list trades indexing for cheap splicing: O(1) insert/delete once you are standing on the node.
02Every node holds a value and a next pointer; the last one points at None.
03You must walk from the head — random access does not exist in a linked list.
04Rewire order matters: the new node grabs curr.next first, then curr.next flips to the new node.
05head is the only handle; a node unreachable from head is garbage collected.
06Python lists store values contiguously; linked lists scatter them and stitch them with pointers.