Hamiltonian path

Look for a tour that visits every room in a museum exactly once. If it exists, find out where to start and which rooms to visit next.

Try an unvisited neighbor. At a dead end erase the last step and try another branch. The path may start anywhere.

Worst-case search explores factorially many possibilities. The step-by-step scene supports up to 7 vertices.