An open API service indexing awesome lists of open source software.

https://github.com/a7bari/shortest-knight-path

Graphs problem
https://github.com/a7bari/shortest-knight-path

chess codewars

Last synced: about 1 month ago
JSON representation

Graphs problem

Awesome Lists containing this project

README

          

# Shortest-Knight-Path

**[check in CodeWars](https://www.codewars.com/kata/549ee8b47111a81214000941)**

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 8x8.

For information on knight moves, see [see in wikipedia](https://en.wikipedia.org/wiki/Knight_%28chess%29)

For information on algebraic notation, see [see in wikipedia](https://en.wikipedia.org/wiki/Algebraic_notation_%28chess%29)