answersLogoWhite

0


Best Answer

Because the quick sort can be used for large lists but selection not.

selection sort is used to find the minimum element ,but quick choose element called pivot and move all smaller nums before it & larger after it.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: When is quick sort better than selection sort?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are the applications of selection sort?

None. Selection sort can only be used on small sets of unsorted data and although it generally performs better than bubble sort, it is unstable and is less efficient than insert sort. This is primarily because insert sort only needs to scan as far back as required to perform an insertion whereas selection sort must scan the entire set to find the lowest value in the set. And although selection sort generally performs fewer writes than insert sort, it cannot perform fewer writes than cycle sort, which is important in applications where write speed greatly exceeds read speed.


Why is quick sort and merge sort called stable algorithms?

Quick sort is not stable, but stable versions do exist. This comes at a cost in performance, however. A stable sort maintains the order of equal elements. That is, equal elements remain in the same order they were input. An unstable sort may change the order. In some cases, the order of equal elements is of no consequence, but when two elements with different values have the same sort key, then order can be important.


Who is better quick sort or merge sort?

Statistically both MergeSort and QuickSort have the same average case time: O(nlog(n)); However there are various differences. Most implementations of Mergesort, require additional scratch space, which could bash the performance. The pros of Mergesort are: it is a stable sort, and there is no worst-case scenario. Quicksort is often implemented inplace thus saving the performance and memory by not creating extra storage space. However the performance falls on already sorted/almost sorted lists if the pivot is not randomized. == ==


Difference between insertion sort and bubble sort?

Bubble sort and insertion sort both have the same time complexity (and space complexity) in the best, worst, and average cases. However, these are purely theoretical comparisons. In practical real-world scenarios, insertion sort (or any other sort, for that matter) will almost always be the better choice over a bubble sort.


What do you understand by complexity of sorting algorithms?

By understanding the time and space complexities of sorting algorithms, you will better understand how a particular algorithm will scale with increased data to sort. * Bubble sort is O(N2). The number of Ops should come out <= 512 * 512 = 262144 * Quicksort is O(2N log N) on the average but can degenerate to (N2)/2 in the worst case (try the ordered data set on quicksort). Quicksort is recursive and needs a lot of stack space. * Shell sort (named for Mr. Shell) is less than O(N4/3) for this implementation. Shell sort is iterative and doesn't require much extra memory. * Merge sort is O( N log N) for all data sets, so while it is slower than the best case for quicksort, it doesn't have degenerate cases. It needs additional storage equal to the size of the input array and it is recursive so it needs stack space. * Heap sort is guaranteed to be O(N log N), doesn't degenerate like quicksort and doesn't use extra memory like mergesort, but its implementation has more operations so on average its not as good as quicksort.

Related questions

Why quick sort better than merge sort?

it has less complexity


What are the applications of selection sort?

None. Selection sort can only be used on small sets of unsorted data and although it generally performs better than bubble sort, it is unstable and is less efficient than insert sort. This is primarily because insert sort only needs to scan as far back as required to perform an insertion whereas selection sort must scan the entire set to find the lowest value in the set. And although selection sort generally performs fewer writes than insert sort, it cannot perform fewer writes than cycle sort, which is important in applications where write speed greatly exceeds read speed.


When does quick sort take more time than merg sort?

Quick sort runs the loop from the start to the end everytime it finds a large value or a small value while in merge sort starts from the first position of the array and assembles the large or small numbers in one side in just one loop so its more faster than quick sort


Who is better in the nhl Stanley cup finals 2012 Quick or Brodeur?

Brodeur because he is more experienced and better than Quick


Does ps3 have better graphics than xbox?

Its sort of optional but i say no, xbox has much better graphics.


Why is quick sort and merge sort called stable algorithms?

Quick sort is not stable, but stable versions do exist. This comes at a cost in performance, however. A stable sort maintains the order of equal elements. That is, equal elements remain in the same order they were input. An unstable sort may change the order. In some cases, the order of equal elements is of no consequence, but when two elements with different values have the same sort key, then order can be important.


When an organism with a better adaptation survives and reproduces more than another this is considered?

natural selection


Which is the better handgun pistol or revolver?

There is no better- some work better for some purposes than others. Sort of like which is better- a spoon or a fork?


What perk is better in Nazi zombies?

i say Juggernog is better than Double tap and Quick Revive. Speed cola is 2nd place. Stamin-up is better than Phd-flopper.


Why was Darwin's theory of evolution better than other theories of evolution?

In a phrase; the mechanism of natural selection.


Is it better to try quick fix first or change head gasket?

If you want to keep the vehicle, there is no better repair than doing it correctly. Any stop leak/quick fix is a temporary repair that can cause other problems.If you want to keep the vehicle, there is no better repair than doing it correctly. Any stop leak/quick fix is a temporary repair that can cause other problems.


Is there any way to perform quick sort other than stack?

Stack is not a way to perform quicksort, it is a tool used to implement recursion.