GeeksforGeeks » Java specific Questions
Merge Vs Quick Sort
(3 posts)-
Java standard prefers merge sort , but c++ standard prefers quick sort , both have average time complexity of O(nlog n) then why we do so ?
-
Actually,Merge sort has O(nlogn) in worst case but quick sort has O(n2) in worst case so i think java uses the optimized sort technique compared to C++
-
Nice explanation here
http://stackoverflow.com/questions/680541/quick-sort-vs-merge-sort
Reply
You must log in to post.