Quick select is a variant of [[quicksort]] for finding the $kth$ smallest element in an array $A$. Consider that the size of the lower side of the partitioned array will give you the rank order of the pivot. Continue with a [[divide-and-conquer]] scheme until the pivot is has $k-1$ elements to the lower side. Quickselect runs in $\Theta(n)$ time using a random pivot in the average case.