Floyd's tortoise and hare detects a cycle in O(1) space, but the part that separates strong candidates is the second phase: a short distance argument that pinpoints exactly where the loop begins. Here is the answer and the math.
Unlock the other 750 answers · ₹2,000 / $25Your progress and mastery stay saved · 6 months · one payment · no auto-renew
