diff --git a/CPP/Algorithm/tower_of_hanoi.cpp b/CPP/Algorithm/tower_of_hanoi.cpp new file mode 100644 index 0000000..7263c02 --- /dev/null +++ b/CPP/Algorithm/tower_of_hanoi.cpp @@ -0,0 +1,28 @@ +// C++ recursive function to +// solve tower of hanoi puzzle +#include +using namespace std; + +void towerOfHanoi(int n, char from_rod, + char to_rod, char aux_rod) +{ + if (n == 1) + { + cout << "Move disk 1 from rod " << from_rod << + " to rod " << to_rod< KMP Algorithm
  • Boyre Moore Voting Algorithm
  • Sepa Algorithm to generate all Permutation
  • +
  • Algorithm for tower of Hanoi
  • ## Want to Contribute?