Index

Module 08 · DSAWorked problems, in English

Clinic #34: Linked List Cycle

Pattern: Fast and slow pointers · LC 141 (and LC 142 in the second read)

Pattern Recognition
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.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Review DSA →

Saved in this browser, and to your account when you sign in.