Knight Minimum Moves on Chessboard
Filed under Attentive OS
The question
Given an N*N chessboard and two positions 'a' and 'b', find the minimum number of moves required for a knight to travel from position 'a' to position 'b'. The knight can move in all eight L-shaped directions. Return -1 if it is impossible.
No write-up yet. Related questions below have one.
Collected from public candidate posts and coding forums. Updated Nov 2026.