Course · Section 10: A Closer Look at Functions · Lecture 137: First-Class and Higher-Order Functions
Implement `hanoi(n)` returning the minimum number of moves to solve the Tower of Hanoi with `n` disks, using recursion.
+ 1 hidden test run on Submit.
Moving n disks needs moving n-1 twice plus one move, which resolves to 2^n - 1.
Run your code to see results.