Towers of Hanoi

The Tower of Hanoi is a mathematical game or puzzle. It consists of three rods and a number of disks of different sizes, which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical shape. 


Instructions

The goal is to move all the disks from peg A to peg C. The disks should end up in the same order on the peg A as they appear on the peg C, obeying specific rules.

  1. You can move only one disk at a time.
  2. You can never place a larger disk on top of a smaller disk.