Trivia ForgePlay free →

What is the worst-case running time of the Randomized Quicksort algorithm?

Show answer

O(n^2)

Even with a random pivot, the worst-case scenario (extremely unbalanced partitions) still exists. However, the probability of encountering this case is infinitesimally small for large n, giving it a robust O(n log n) expected time.

Would you remember this in 6 months?

Trivia Forge uses spaced repetition so facts stick. Free, no signup needed.

Turn on Algorithms practice →

More Algorithms trivia

See all 83 →