Randomized Median Finding and Quicksort