Pattern: Fast and slow pointers · LC 141 (and LC 142 in the second read)
Pattern Recognition · Open board
Shows four problem shapes side by side. This clinic is the third one: a fast pointer lapping a slow one around a loop, worked on the problem it was made for.
Before you start.Linked Lists, Stacks & Queues built the chain: each item sits in a box called a node, and each node carries a note, the pointer, saying which node comes next. The only way through a chain is to start at the first node and follow the notes one at a time, because there is no “jump to box 5”. The last node’s note normally says “nothing next”, and that is how you know the chain ended.
Lesson 74 of 96 in DSA
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.