Algorithms_in_C++
1.0.0
Set of algorithms implemented in C++.
|
Solve the Tower of Hanoi problem. More...
#include <iostream>
Classes | |
struct | tower |
Functions | |
void | show (const struct tower *const F, const struct tower *const T, const struct tower *const U) |
void | mov (tower *From, tower *To) |
void | TH (int n, tower *From, tower *Using, tower *To) |
int | main () |
Solve the Tower of Hanoi problem.
int main | ( | void | ) |
Main function
Display the towers
Recursive algorithm to solve the puzzle
[in] | n | starting number of disks |
[in,out] | From | tower to move disks from |
[in,out] | Using | temporary tower for the puzzle |
[in,out] | To | tower to move disk to |