Adding towers of hanoi problem, stack with O(1) min access