RadixSelector

abstract class RadixSelector : Selector

Radix selector.

This implementation works similarly to a MSB radix sort except that it only recurses into the sub partition that contains the desired value.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun checkArgs(from: Int, to: Int, k: Int)
Link copied to clipboard
open override fun select(from: Int, to: Int, k: Int)

Reorder elements so that the element at position k is the same as if all elements were sorted and all other elements are partitioned around it: [from, k) only contains elements that are less than or equal to k and (k, to) only contains elements that are greater than or equal to k.