CPSC 311, Sec 501: Quiz 4
Feb 11, 2004
Name:________________________________________
- (1 pt) What is the definition of a comparison based
sorting algorithm?
- (1 pt) What is the lower bound on the worst-case running
time for any comparison-based sorting algorithm?
- (1 pt) Suppose you are to sort n keys, whose values
are integers in the range from 1 to n.
What is the worst-case running time of counting sort
in this situation?
- (1 pt) In order for bucket sort to have O(n) running
time on n keys, what property about the distribution of
keys to buckets must hold?
- (1 pt) What is the recurrence that describes the
running time of randomized select?