Re: [algogeeks] The following problem is a variation of "Tower of hanoi" problem...Plz suggest on how to approach the following problem...

2012-05-30 Thread Prateek Jain
built a tree (not binary) where the root node is the initial configuration of pegs. For each possibility of movement of the initial configuration of disks, a child node is created. Thus, for each child node created, I check if the current configuration is the final configuration. If yes, problem wa

[algogeeks] The following problem is a variation of "Tower of hanoi" problem...Plz suggest on how to approach the following problem...

2012-05-30 Thread g4ur4v
There are K pegs. Each peg can hold discs in decreasing order of radius when looked from bottom to top of the peg. There are N discs which have radius 1 to N; Given the initial configuration of the pegs and the final configuration of the pegs, output the moves required to transform from the initial