Hello Everyone, I am trying to solve this problem. but not able to come up with a solution. can someone help me with solving the problem any approach/hint.
Problem Statement: Given a square chessboard of N x N size, the position of Knight and position of a target is given. We need to find out minimum steps a Knight will take to reach the target position. Only Perpendicular Moves Are Allowed.
1<=N<=150. 0<=StartX<=64 0<=StartY<=64
StartX and StartY Indicate Starting Location. EndX and Endy Indicate Ending Location.
N=8 startX and StartY = 0,5
endX and endY = 6,5