Working Quicksort, but need to implement O(n) time for the median-of-three case. Currently uses a sort.