introSort

fun <T> introSort(a: Array<T>, fromIndex: Int, toIndex: Int, comp: Comparator<in T>)

Sorts the given array slice using the Comparator. This method uses the intro sort algorithm, but falls back to insertion sort for small arrays.

Parameters

fromIndex

start index (inclusive)

toIndex

end index (exclusive)

See also


fun <T> introSort(a: Array<T>, comp: Comparator<in T>)

Sorts the given array using the Comparator. This method uses the intro sort algorithm, but falls back to insertion sort for small arrays.

See also


fun <T : Comparable<T>> introSort(a: Array<T>, fromIndex: Int, toIndex: Int)

Sorts the given array slice in natural order. This method uses the intro sort algorithm, but falls back to insertion sort for small arrays.

Parameters

fromIndex

start index (inclusive)

toIndex

end index (exclusive)

See also


fun <T : Comparable<T>> introSort(a: Array<T>)

Sorts the given array in natural order. This method uses the intro sort algorithm, but falls back to insertion sort for small arrays.

See also