Skip to content

paschoal-artur/RecusiveHanoiSolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Hanoi Solver, Recusive C++ Exercise

##The Tower of Hanoi is a classic problem in computer science and mathematics. It consists of three rods and a number of disks of different sizes, which can be moved from one rod to another following specific rules without placing a larger disk on top of a smaller one.

"#include "
"#include "
These lines include necessary standard C++ libraries for input/output and using stacks.

"void torreDeHanoi(int numDiscos, stack &origem, stack &auxiliar, stack &destino, const string &origemNome, const string &auxiliarNome, const string &destinoNome)"
This function performs the Tower of Hanoi operation using three stacks representing the rods (origem, auxiliar, and destino). It takes the number of disks, references to the stacks, and strings representing rod names as parameters.

Recursive Implementation:

About

Código do trabalho

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages