-
The Tower of Hanoi is a mathematical game or puzzle consisting ofthree rods and a number of disks of various diameters, which can slide onto any rod. The puzzle begins with thedisks stacked on one rod in order of decreasing size, the smallest at the top, thus approximating a conicalshape. The objective of the puzzle is to move the entire stack to the last rod, obeying the following rules:
- Only one disk may be moved at a time. - Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack or on an empty rod. - No disk may be placed on top of a disk that is smaller than it.
harshranjan-17 / tower-of-hanoi Goto Github PK
View Code? Open in Web Editor NEWTower of Hanoi with graphical view