The standard worst case complexity of quick sort is O(n^2). What is this worst case and how can I make modifications in such a case to come up with a better behaviour?
This is just a theoretical question.
The standard worst case complexity of quick sort is O(n^2). What is this worst
Share
The worst case is whenever you choose a pivot, it always turns out to be either the largest or the smallest element in the segment that you’re sorting. To improve on the worst case, you need to have a good method of choosing the pivot.