开发者

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜