Data structures · Graphs

Depth-first search

A search can also follow one route as deep as it goes before trying another, and recursion writes it in six lines.