// TOPIC
#cycle-detection
2 articles
◆◆IntermediateGoogleAmazon
01Topological Sort
Order the nodes of a DAG so every edge points forward — the algorithm that drives build systems, package managers, course schedulers, and anything else that lives and dies by dependency ordering.
#graphs#dag#topological-sort
13 min◆◆IntermediateAmazonMeta
02Fast & Slow Pointers (Cycle Detection)
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