Games

Tower of Hanoi

Move all disks to the right peg. One at a time. Larger never on smaller.

  • Tap a peg to pick up its top disk, then tap another peg to place it.
  • You can only move one disk at a time.
  • You can never place a larger disk on a smaller disk.
  • Goal: move the entire stack from the left peg (A) to the right peg (C).
  • The minimum number of moves for n disks is 2ⁿ − 1.
  • Tap Solve to watch an automatic solution (won't submit to leaderboard).
Moves
0
Optimal
31
Time
0:00
Best
A
B
C
Solved

Well done!

You solved it.