Est. Budget: $50.00
Given a list of n numbers, the Selection Problem is to find the kth smallest element
in the list. The first algorithm (Algorithm 1) is the most straightforward one, i.e. to sort
the list and then return the kth smallest element. It takes O(n log n) amount time. The
second algorithm (Algorithm 2) is to apply the procedure Partition used in Quicksort.
The procedure partitions an array so that all elements smaller than some pivot item come