Hi Guys..After a Good Discussion...I Found that we can  sort the DLL
in O(n)..as most of you are saying that there is well known bound on
comparison sort (nlogn)
But still i have a doubt that we can sort the array,Singly Linked List
(SLL)  in (nlogn) ..both single thing associated with it..array has
index & SLL has next pointer
but i am again thinking that DLL has two pointer prev & next ..so if
we sort the DLL as we solve the array or SLL while comparing current &
next value then what is the benefit of having two pointer in case of
DLL ...you know if someone able to provide the solution in O(n)....in
case of DLL her/his name will remembered in computer history...


Although I have solved the problem using Merge Sort (nlogn)
You Can Play with It...click here     http://codepad.org/wPMtgRHe

Correct if you find that concept is wrong & any flaw in approach..


Thanks & Regards
Shashank Mani ""The best way to escape from a problem is to solve it."

-- 
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