Skip to content

xfr0ntier/towers-of-hanoi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Towers of hanoi

Towers of Hanoi implementation in C++

Description

For the game description you can visit Tower of Hanoi page of wikipedia

Algorithms

Pattern alogrithm

First algorithms is using a patterm-based solution as we move the cubes with respect to their appropriate lengths, according to the pattern (rod[0] <--> rod[1]) (rod[0] <--> rod[2]) (rod[1] <--> rod[2])

Recursive algorithm

Second algorithm is using a divide-and-conqure approach to divide the problem into smaller ones, till reaching the base case which consists of just one cube to move freely to the appropriate avaliable spots.

About

Towers of Hanoi implementation in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published