Two pointers moving at different speeds — the tortoise and hare — detect cycles, find the middle of a linked list, and locate cycle starts, all in O(1) space. The single most-asked linked list technique in FAANG interviews.
#linked-lists#two-pointers#cycle-detection
12 min