Skip to content

Objective is to get minimum number of steps for a Knight to reach far right hand side corner. Also trace the path he travels.

Notifications You must be signed in to change notification settings

sriramsantosh/Chess-Board

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess-Board

Objective is to get minimum number of steps for a Knight to reach far right hand side corner. Also trace the path he travels.

For example : If we have a 3 X 3 chessboard, (x,y) represents the Knight's initial position.

  1. If (x,y) is (2,2), an exception needs to be thrown as a Knight starting at that place can never reach (3,3).

  2. If (x,y) is (1,1), the minimum number of moves in which it reaches (3,3) is 4 and the path also will be printed out.

  3. So, the input can be any position, valid or invalid, minimum number of moves and the path will be printed accordingly.

The solution provided is scalable and is not limited to a 3 X 3 chessboard.

About

Objective is to get minimum number of steps for a Knight to reach far right hand side corner. Also trace the path he travels.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages