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
- Host: GitHub
- URL: https://github.com/a7bari/shortest-knight-path
- Owner: A7bari
- Created: 2022-01-24T16:57:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-25T14:36:29.000Z (over 3 years ago)
- Last Synced: 2025-03-17T18:17:46.323Z (7 months ago)
- Topics: chess, codewars
- Language: C++
- Homepage:
- Size: 5.86 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)