IntroSort module

intro_sort

procedure · 1 overloadSource

Sorts an array view in place with a three-way comparator: negative, zero or positive. Quicksort partitions around a median of three; a range that nests too deep falls back to heap_sort, and short ranges finish with insertion_sort.

intro_sort :: (array: [] $T, f: (T, T) -> $R)

Parameters

array: [] $T
f: (T, T) -> $R

See also