check in CodeWars

Given two different positions on a chess board, find the least number of moves it would take a knight to get from one to the other. The positions will be passed as two arguments in algebraic notation. For example, knight(“a3”, “b5”) should return 1.

The knight is not allowed to move off the board. The board is 8×8.

For information on knight moves, see see in wikipedia

For information on algebraic notation, see see in wikipedia


View Github