Towers of Hanoi are ........ing me off
Hi, I made the recursive solution for the ToH problem, but I can't wrap my head around the iterative version.
I can't use vectors etc, just integer arrays or structs. Teacher gave me some clues though:
1. Always move the smallest disc first in a “clockwise” manner.
2. Then, move the smaller remaining disc onto the the other (which is the only legal move left).
3. Keep repeating this process.
I've been busy with the recursive one for almost 2 days, and now this again.. sigh.