Why does fast/slow find the middle?
Practice this question from Middle of the Linked List - Fast and slow pointers Pattern Practice Quiz, with options and an explanation.
Question
Why does fast/slow find the middle?
Option A — Correct answer
Fast moves twice as far as slow
Option B
Slow moves twice as far as fast
Option C
Both pointers move backward
Option D
Fast stores values in a set
Explanation
Fast moves twice as far, so slow moves half the list by the time fast ends.