What is the difference between partition sort and quick sort?
What is the difference between par开发者_开发技巧tition sort and quick sort?
Quicksort is a Partitioning Sorting Algorithm, you might refer to Mergesort which also is a Partitioning Sorting Algorithm, the biggest difference is probably the speed, Quicksort is faster even though both of them are O(n*log(n)).
Quicksort uses a Pivot element for its sorting and MergeSort divides & conquers. Both however are in-place sorting algorithms, which means they don't use any extra memory when sorting.
There is a part of the algorithm QuickSort that is the partition, its about placing an element of the array between all the elements that are above him(on his right subarray) and below him(on his left).
精彩评论