Problem 1197 · Medium

Minimum Knight Moves

Expand the knight’s reachable cells in rings with breadth-first search; the first time the target is popped gives the fewest moves.

Open the interactive visualisation