[algogeeks] Re: A hanoi based problem

2007-03-23 Thread Rajat
> 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 = > and it'll be be on top of one of the towers. > > Every time,

[algogeeks] Re: A hanoi based problem

2007-03-23 Thread nima
try to solve the problem backwards from the solved state. assume that all of them are sorted in tower C (the solved state.) now you're to move them to reach the initial position. so first try to move the biggest ring into it's place [in the initial pos.] then second ring and so on. the reverse o

[algogeeks] Re: A hanoi based problem

2007-03-22 Thread Rajat
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 = and it'll be be on top of one of the towers. Every time, you need to mo