3 ms·
Randomized QuickSort has an expected worst case runtime of O(n log n). To pick that part, first you write your (randomized) QuickSort, then your antagonists pi
by eru 13y ago
Randomized QuickSort has an expected worst case runtime of O(n log n).
To pick that part, first you write your (randomized) QuickSort, then your antagonists picks the worst case, and last you let your algorithm run and pick its random numbers. No matter how the antagonist chooses the input (but not the random numbers), you get O (n log n) expected runtime.
This is different from an average (over all inputs) run time.