quickselect k-th smallest