partitionSelect

partitionSelect(x, k)

partitionSelect(x, k, compare)

Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.

Try it yourself:

See also:
All functions