if you know the range then you can use something like count sort, but as here nothing is mentioned you have to take at least O(nlogn) time as the lower bound of comparision sort is O(nlogn)
On Sun, Jan 30, 2011 at 6:10 PM, bittu <[email protected]> wrote: > Sort the Doubly Linked List..In Minim time complexity...is it possible > to sort doubly linked list in O(n)..can some one > provide..tutorial ,code or algo fro this....when u will fright with > with amazon..you will see this question..as it is..so try it now.. > > Thanks > Shashank > > -- > 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.
