countingSort

public final static Array<T> countingSort<T extends IntSupplier>(Array<T> input, Integer k)(source)

Sorts input using counting sort into a new array and returns it. The input array will not be changed.

Parameters

input

The array to sort by IntSupplier.getAsInt

k

The maximum value returned by IntSupplier.getAsInt