Link Search Close Search Menu Expand Document

Tower Of Hanoi

Tower of Hanoi is a mathematical puzzle.
It consists of three rods and number of disks of different sizes.
In the beginning all the disks are placed in the source rod, in sorted order with smallest on top.
The goal is to move all the disks from source rod to target rod using an auxiliary rod by obeying these rules:

  • • Only one disk can be moved at a time.
  • • Each move can take the disk on top of any rod and move to another rod.
  • • Larger disk should not be placed on a smaller disk at any time.

Visualization of Tower Of Hanoi

Implementation of Tower Of Hanoi





Back to top

Copyright © 2020-2021 Gajanan Bhat. All rights reserved.