Given two different positions on a chessboard, 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 8x8.
For information on knight moves, see https://en.wikipedia.org/wiki/Knight_%28chess%29
For information on algebraic notation, see https://en.wikipedia.org/wiki/Algebraic_notation_%28chess%29
Want to propose a challenge idea for a future post? Email email@example.com with your suggestions!