骑士游历问题问题
Problem Statement:
问题陈述:
There is a chessboard of size N×M and starting position (sx, sy) and destination position (dx,dy). You have to find out how many minimum numbers of moves a knight goes to that destination position?
有一个大小为N×M的棋盘,其起始位置(sx,sy)和目标位置(dx,dy) 。 您必须找出一个骑士去那个目的地位置的最小移动次数?
Example:
例:
Input:
输入:
Check the above example...
检查上面的例子...
If the source position is (5,5)