Problem 847 · Hard

Shortest Path Visiting All Nodes

Breadth-first search over (visited-set bitmask, current node) states.

Open the interactive visualisation