I guess the average still being O(n) makes quickselect more supreme in this case. Most of the times, the input is random.

Quicksort goes to O(n^2) if the array is ordered somehow and pivot is chosen wrongly. But works at O(nlogn) for random inputs and pivot chosen randomly (or wisely like, avg of three random numbers already in the input).

But with radix, the O(kn) seems promising, but that k might be a bit of a problem sometimes. I did a lot of research regarding the topic.

My thoughts on this are that it is better to be safe and guarantee an avg O(n) with quickselect as opposed to O(kn) with radix, where you are not sure of k, without seeing the inputs or knowing the range.

But hey, I appreciate you posting the radix solution - something I did not think about until after you posted it.