Skip to main content

2 docs tagged with "cycle-detection"

View all tags

Cycle Detection

A cycle is a path that leaves a vertex and, by following edges, returns to it. That definition reads

Fast & Slow Pointers

A singly-linked list, or anything shaped like one — a permutation's i -> p[i] mapping, a