CS 371: Recursion Module: Towers of Hanoi

Module content developed by Professor Tralie. Module engine developed by Professor Tralie and Professor Mongan.


Towers of Hanoi is an ancient game where the goal is to move a bunch of discs from one peg to another. The discs have to be moved one at a time, and you are never allowed to put a smaller disc on top of a larger disc. Click here to try it out live if you haven't seen it before. Then, watch the video below that discusses an optimal solution to this problem (from my 174 class). This solution is described in terms of smaller versions of the same problem, so it is perfect for recursion. Once you have finished watching the video, click the Next button to continue.