Suman Karumuri wrote: > Hi all, > > Is there an iterative solution to towers of Hanoi. I have tried to > write one but failed. Google did not reveal anything interesting.
If there are N discs, alternate between two moves: - move smallest disc to right (left) if N is even (odd) - make only legal move not involving smallest disc > Any pointers are helpful. http://www.cs.princeton.edu/courses/archive/spring06/cos126/lectures/07.pdf --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---