Problem 2360 · Hard

Longest Cycle in a Graph

Each node has at most one outgoing edge, so walk from every unvisited node and measure a cycle when a walk meets itself.

Open the interactive visualisation