Heriot-Watt University
Activities in unit 1 Activities in unit 1 Heriot-Watt University
Heriot-Watt University
Go Back
Towers of Hanoi

This shows how two stacks can be placed in the same array. They are mirrored, so that the left stack has its base at the start of the array and the right stack has its base at the end of the array. When they are about to meet, the array length is doubled.

©Heriot-Watt University 2001