Tower of Hanoi, iterative and recursive versions