#100daysblockcodingchallenge||Day3: Tower of Hanoi
Day3:Tower of Hanoi
Tower of Hanoi Algorithm
Tower of Hanoi is puzzle where we have 3 rods and 3 disk in this case. You may have n disks(I have mentioned buttons in video).
You have to move the Stack from one stick to another stick by obeying the following rules.
- Only one disk can be moved at a time.
- Only uppermost disk can be moved.
- No bigger disk can be placed on the top of smaller disk.
2)Destination of Disks.
Note:Make Optimal Moves.
1)Success Case 2)Failure Case
Click here for Video Description
Comments
Post a Comment