Worst-case optimal incremental sorting
Erik Regla, Rodrígo Paredes · 2015
We present an online algorithm to, given a fixed array A, retrieve its k smallest elements in optimum time for the worst case, that presents fast response in practice. For this, we devise an introspective version of the Incremental Quicksort (IQS) algorithm, which controls the size of the auxiliary stack of the IQS algorithm via an introspective criteria.