awesome-everything RU

fast and slow pointers

RU: быстрый и медленный указатели

A two-pointer technique (Floyd's cycle detection / tortoise-and-hare) where a slow pointer advances one step per iteration and a fast pointer advances two. If the two pointers ever meet, a cycle exists; resetting one to the head and advancing both one step at a time then finds the cycle entry. Runs in O(n) time and O(1) space.

shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?