Separate the ascending and descending lists.
   lets say ascending lists are l1,l2,l3 and l4 and descending lists
are l5,l6,l7.
   Reverse all these descending list.(reverse(l5),reverse(l6) and
reverse(l7))
   Now keep on merging all these 7 sorted lists two at a time.
    Its of ~o(n)time and o(1)space

--

You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@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