Solving the Tower of Hanoi using recursion