Skip to content

jpfkd/hanoi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hanoi

Shows you how to solve the puzzle called Tower of Hanoi.

Installation

git clone https://github.com/jpfkd/hanoi
cd hanoi
make

Usage

./hanoi 5

You must specify the number of discs in the game as the first option. Above command will give you below output.

left to right
left to center
right to center
left to right
center to left
center to right
left to right
left to center
right to center
right to left
center to left
right to center
left to right
left to center
right to center
left to right
center to left
center to right
left to right
center to left
right to center
right to left
center to left
center to right
left to right
left to center
right to center
left to right
center to left
center to right
left to right
Total 31 movements.

About

Shows you how to solve the puzzle called Tower of Hanoi.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors