148,305 views 170 on YTPak
504 68

Published on 03 Mar 2014 | over 2 years ago

Tower of Hanoi is a very famous game. In this game there are 3 pegs and N number of disks placed one over the other in decreasing size. The objective of this game is to move the disks one by one from the first peg to the last peg. And there is only ONE condition, we can not place a bigger disk on top of a smaller disk.

If you are interested in solving the game, then download the FREE Tower Of Hanoi game from goo.gl/K0A6QC

In this video we will learn to solve Tower Of Hanoi recursively by taking minimum number of moves.

0:03 About Tower Of Hanoi
0:18 Important rule to follow while solving Tower Of Hanoi
0:25 The three pegs of Tower Of Hanoi labeled A, B and C
0:33 The 3 disks in decreasing size from bottom to top
0:38 Objective of the game
0:51 How to solve Tower Of Hanoi
0:58 The general notation used to solve the Tower Of Hanoi problem recursively
1:15 The 3 steps to follow recursively to solve Tower Of Hanoi
1:50 Solving the game with 3 disks
2:05 Calculating the minimum number of moves to solve Tower Of Hanoi recursively
2:10 Solving T(3, A, B, C)
3:05 Solving T(2, A, C, B)
3:58 Solving T(2, B, A, C)
4:55 So we have the moves. Lets see them in action!
6:10 Solved!
6:15 Algorithm of Tower Of Hanoi (Recursive)
6:42 Calculating minimum number of moves to solve Tower Of Hanoi having N disks

Related Videos
Factorial www.youtube.com/watch
Fibonacci www.youtube.com/watch

You can download the code from my GitHub repository

To know more about Pseudo code kindly watch this video

Thanks :-)

Loading related videos...