Skip to content
Code ReadingReachable Nodes
Bug Hunt

Reachable Nodes

It should return the nodes reachable from the start. It works on graphs without cycles, but a cycle like A→B→A makes it run forever. Find the line and the kind of bug.

Click the line you think is wrong.