Ask your own question, for FREE!
Computer Science 6 Online
OpenStudy (anonymous):

Is there a better sorting algorithm than QuickSort?

OpenStudy (anonymous):

the ones that use comparision sorts, the best the can do its O(n x log(n)) so quicksort its the best as merge sort and heap sort. however there are others that doesnt use comparisions that have better times, here u can find and see them http://en.wikipedia.org/wiki/Sorting_algorithm

OpenStudy (anonymous):

Previous answer is wrong; Quicksort is O(n*log n) only in the average case, but in the worst case it is O(n*log n). There are other algorithms that are ALWAYS O(n*log n) even in the worst case (e.g. Heap Sort and Merge Sort). So for general use on large arrays they could be superior unless you know in advance that the case in question is not one of the bad ones for Quicksort.

OpenStudy (anonymous):

i never told him that quicksort its O(n * log(n)), fine if you made it clear, i just told that the best u can get doing ANY algotihm that use compatisions its O(n * log(n)) and quicksort behave pretty well just like merge and heap sort, if he wants something more powerful use one of the radix sorts that doesnt compare, hope this solve your question

OpenStudy (rsmith6559):

Quicksort is excellent on unsorted data. If the data is almost sorted, the performance of quicksort degrades to being unacceptable. Mergesort and heapsort both have much better performance on almost sorted data, but quicksort will beat them noticeably on unsorted data.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!