Minimum Knight Moves on an N×N Board
Minimum Knight Moves on an N×N Board
Given an N×N chessboard (0-indexed coordinates in [0, N-1]), a knight starts at (sx, sy). Each move is a standard knight move ((±1, ±2) or (±2, ±1)) an...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
