Re: [algogeeks] Linked List Problem-Suggest Algo

2011-11-21 Thread Piyush Grover
As you mentioned, the numbers designating the gaps can only be repeated so in your example 2 20 can be broken into 19 1 but 19 is already there in the list (the first couplet) and it's not the one which describes the gap. can you please clarify? On Mon, Nov 21, 2011 at 5:23 AM, Ankur Garg wrote:

[algogeeks] Linked List Problem-Suggest Algo

2011-11-20 Thread Ankur Garg
a linked list contains 2 19 _ _ 3 47 _ _ _ 2 20 _ _ ..and so on I have to fill those empty nodes with numbers whose sum is equal to the numbers occurring just before the gaps and the number of gaps is determined by the node which is at 2 distance before the gaps with the limitation that