How do fast and slow pointers detect a cycle?

Practice this question from Linked List Cycle - Fast and slow pointers Pattern Practice Quiz, with options and an explanation.

Question

How do fast and slow pointers detect a cycle?

Option A — Correct answer

Fast eventually meets slow inside a cycle

Option B

Slow always reaches null first

Option C

Values are compared by frequency

Option D

The list is sorted automatically

Explanation

Fast moves two steps and slow moves one; inside a cycle, fast eventually meets slow.

Linked List Cycle - Fast and slow pointers Pattern Practice Quiz

All questions · Previous question · Next question

Open on QuizMaker