๐Ÿ—ผ

Tower of Hanoi

Play Tower of Hanoi free: move the whole stack to the right peg in the fewest moves. The classic recursion puzzle that trains planning and problem solving.

Medium 5 min Logic & Reasoning
Advertisement

Tower of Hanoi

Click a peg to pick up its top disk, then click another peg to drop it.
You may never place a larger disk on a smaller one.
Minimum moves: 3 disks = 7, 4 disks = 15, 5 disks = 31.

Moves: / โฑ s

๐Ÿ†

All-Time Top Scores

Tower of Hanoi best players

No scores yet โ€” be the first!

๐Ÿ”ฅ

Today's Challenge

Daily top scores โ€” resets at midnight

Aug 09

No one has completed today's challenge yet โ€” play the daily mode and grab the ๐Ÿฅ‡!

Advertisement

About Tower of Hanoi

Play Tower of Hanoi free: move the whole stack to the right peg in the fewest moves. The classic recursion puzzle that trains planning and problem solving.

This free tool is designed to be quick, fun, and effective. It runs entirely in your browser, so your data never leaves your device and no account is required. Play once or come back daily to track your progress and improve your score.

Tower of Hanoi - Frequently Asked Questions

For n disks the minimum is 2โฟ โˆ’ 1: 7 moves for 3 disks, 15 for 4 and 31 for 5. This is the classic example of exponential growth in computer science.
Move the largest disk only after clearing everything above it, then rebuild the smaller disks on top of it. This recursive strategy solves any size.
Score = 1000 ร— (minimum moves รท your moves). Solving it optimally scores 1000; fewer mistakes and fewer wasted moves score higher.
Advertisement