Back to problems

Chess Piece Shortest Path on a Fixed Board

Algorithm · Waymo · Medium

Requirements Write a function that computes the fewest knight moves needed to go from one square to another on a rectangular, finite board. Use the following interface: Treat start and dest as board coordinates, and represent blocked as the collection of squares that cannot be entered. The initial version may use an empty collection for blocked. Provide a main routine together with any helper functions needed to read input, generate moves, and run a deterministic test.…

Checking your access…