u can xor linked list. such that every node link contains the xor of its prev nd next node address.. since for 1st node prev is null ( 0) so its link contains only next. now to calculate next of 2nd node xor its link with 1st node's link nd u ll get 3 rd node.s adddress nd so on..
u can also use sum. store in link the sum of prev node n next node address.. bt this cn result in overflow. so xor method is better On 16 June 2010 09:14, sharad kumar <[email protected]> wrote: > u have to use XOR linked list > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<algogeeks%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
