May 2017
Intermediate to advanced
340 pages
8h 16m
English
The worst case complexity of quick sort can be similar to bubble sort's complexity. The selection of the pivot actually causes this. Here is the complexity chart for a quick sort:
|
Best time complexity |
Ω(nlog(n)) |
|
Worst time complexity |
O(n2) |
|
Average time complexity |
Θ(nlog(n)) |
|
Space complexity (worst case) |
O(log(n)) |
Read now
Unlock full access