Randomized Quicksort
← Back to Las Vegas
Quicksort with a randomly chosen pivot element. This Las Vegas algorithm avoids the O(n^2) worst case of deterministic pivot selection by making the worst case depend on random choices rather than input order. Expected O(n log n) time for all inputs.