Data structures and algorithms · Linked lists
Fast and slow, and a dummy head
Two pointers on a chain, and the trick that removes special cases. · 10 minutes
Predict first
slow moves one node per step and fast moves two. When fast reaches the end of a 9-node list, where is slow?