pub fn mergesort<T>(s: &[T], i: usize, n: usize) -> Vec<usize, Global> where
T: PartialOrd<T> + Copy,
Expand description
Doubly recursive non-destructive merge sort.
The data is not moved or mutated.
Efficiency is comparable to quicksort.
Returns a vector of indices to s from i to i+n,
such that the indexed values are in ascending sort order (a sort index).
Only the index values are being moved.