What is the invariant of the classic partition loop?
What does the partition step do?
A sorted input makes fixed-pivot quicksort shrink the problem by only one item per round.
Circle one: True False
In the worst case, rounds cost 5, 4, 3, 2, then 1 comparisons. Type the total.
Answer: ______________
Why is that shrinking pattern quadratic?
What does picking the pivot at random change?
Partitioning scans its section once, doing work proportional to its length.
Circle one: True False
Which claim about randomised quicksort is wrong?