two positions of a NxN chess board can be connected by pawns move(diagonally) iff both of them are on black/white position, this can be checked by checking the pair. if both of the x,y (start  position ) and X,Y(end position) are odd,odd or even,even then they can be connected or both of the pair are of type odd,even then also they are connected, besides for the dissimilarity of the start and end position pairs can not be connected.

If they can be connected then they will need maximum 2 moves.


Leave a Reply

Your email address will not be published. Required fields are marked *