clrs; exercise 9.3.3 - quicksort in O(nlgn) time
clrs; exercise 9.3.4 - partition along with finding a median