don't know if i am complicating..assumption,

build a multimap of values and the corresponding node address as well as a
heap from the given nodes in first pass.

now from minheap pick one by one and set the second pointer of previous
picked min element to this element using multimap(remove from multimap in
parallel while updating the second pointers).






Best Regards
Ashish Goel
"Think positive and find fuel in failure"
+919985813081
+919966006652


On Sat, Mar 24, 2012 at 12:50 AM, Atul Singh <atulsingh7...@gmail.com>wrote:

> Given a linked list with each node having two pointers : one pointing to
> next node & other to null;
> how will u point the second pointer to next larger no. and return the
> pointer to smallest node
>
>
>
> --
> ATul Singh | Final Year  | Computer Science & Engineering | NIT Jalandhar
>  | 9530739855 |
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> 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 algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to