I hope there is no specified order of distribution of the disks in the
three towers except that they ARE indeed, ordered (a smaller disk
restts on a bigger disk)

Let us keep track of the sorted pile, initially sorted_pile = <disk1>
and it'll be be on top of one of the towers.

Every time, you need to move the entire "sorted pile" such that after
move, the biggest / lowermost disk in the pile gets to sit on its
successor. The successor is surely going to be either on the top of
one of the other two disks, or below the sorted pile itslef (in which
case no need to move, just sorted_pile++)

But I don't think this is the best solution.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to