BeautyyuYanli / gitalk-for-blog

gitalk-for-blog
0 stars 0 forks source link

Details of Quick Sort #36

Open BeautyyuYanli opened 1 year ago

BeautyyuYanli commented 1 year ago

https://blog.beautyyu.one/details-of-quick-sort

Quick Sort has an average-case performance of O(n log n). However, the worst-case performance happens when the pivot element selected is either the smallest or largest element in the list. This may occur in two scenarios: when the array contains all the same elements, or when the elements are already sorted.