Quickselect
Quickselect Quickselect finds the k-th smallest element in an unsorted array. It uses the same partition idea as Quicksort but only recurses into one side, which reduces work. You use it when you need a single order statistic such as median, top-k, or percentile, without fully sorting the array. Problem Given an array $A$ of length $n$ and an integer $k$ with $0 \le k < n$, find a value...