Problem 802 · Medium

Find Eventual Safe States

Peel off terminal nodes by reversing edges: a node is safe once all its out-neighbours are safe.

Open the interactive visualisation