Floyd's tortoise-and-hare — O(1) space instead of a visited set.
Two pointers: slow moves 1 step, fast moves 2. If there's a cycle, fast laps slow and they meet; if fast hits null, no cycle. This 'different speeds' idea also finds the middle node and the n-th-from-end. Why they must meet: once both are inside the loop, fast closes the gap to slow by exactly one node per step, so it can never jump over — the gap hits zero. A follow-up asks for the cycle's entry node: after they meet, reset one pointer to head and advance both one step at a time; they meet again at the entry (Floyd's algorithm). It's O(1) space versus a hash set of visited nodes.
Cycle detection, finding the middle, or n-th-from-end in one pass → fast & slow pointers.
Time O(n) · Space O(1)