Question

What is the worst-case time complexity of QuickSort with a random pivot for sorting n distinct elements?

A O(n log n) expected, O(n²) worst-case
B O(n²) expected, O(n log n) worst-case
C O(n) expected, O(n log n) worst-case
D Always O(n log n) worst-case
E O(n³) worst-case
Practice Next

Hey! Ask a query