Problems > Tower of Hanoi: The Moves > Editorial

Tower of Hanoi: The Moves — Solution & Editorial

Back to the Problem

The classic recursion: move N−1 discs to the spare, move the big disc, move the N−1 back on top. The optimal sequence is unique.

Complexity: O(2N)