Abstract
This short note considers the following common problem: rearrange a given array with n elements, so that
the first m places contain the m smallest elements in ascending order. We propose here a simple variation of
quicksort that efficiently solves the problem, and show and quantify how it outperforms other common alternatives.