ToH

I've created the Towers of Hanoi recursive version, but to my dismay I now see that I have to create one iteratively as well
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.
Last edited on
Quick google led me to someones version possibly of what you want.

http://www.notesbit.com/index.php/source-code-cc-nsis/tower-of-hanoi-a-sample-c-programs-algorithm/
Nah, that uses alot of things I can't even use.. isn't there a way to transform my recursive one into an iterative?
Topic archived. No new replies allowed.