+ 5

which sorting algorithm is the most efficiency? look at the description for the options.

•Bucket sort. •Bubble sort. •Insertion sort. •Selection sort. •Heap sort. •Merge sort.

3rd May 2017, 5:50 PM
chris
chris - avatar
6 Answers
+ 9
No Quick sort?
3rd May 2017, 5:54 PM
Karl T.
Karl T. - avatar
+ 9
It is certainly among the most efficient in time but also space complexity. If you want the exact the solution look at this: http://quiz.geeksforgeeks.org/time-complexities-of-all-sorting-algorithms/ And if you don't know what time and space complexity is : https://www.hackerearth.com/practice/basic-programming/complexity-analysis/time-and-space-complexity/tutorial/
3rd May 2017, 6:04 PM
Karl T.
Karl T. - avatar
+ 8
Quicksort is better for 'randomized' data. The more sorted it is beforehand, the slower the quicksort will be.
3rd May 2017, 8:08 PM
Rrestoring faith
Rrestoring faith - avatar
+ 4
is quick sort the most efficiency?
3rd May 2017, 5:59 PM
chris
chris - avatar
+ 4
The Landau expression for time complexity does not tell the whole story though. Even if the expected runtime of two algorithms is in θ(n log n), one can be faster by a constant, but huge, factor. In most cases quicksort will be much faster than heap or mergesort for example. If you have reason to believe your data sets you up for a bad case (does not happen all too often), you should consider using one of the other algorithms though.
3rd May 2017, 6:18 PM
Tob
Tob - avatar
0
From the options, merge sort is better for generic purposes. In specific situations, it will depend on the data.
4th May 2017, 2:42 AM
Denis Felipe
Denis Felipe - avatar