Object providing in-place sorting capability for arrays.
Sorting.sort() uses quickSort() by default (in-place, not stable, generally
fastest but might hit bad cases where it's O(n^2)). Also provides
mergeSort() (in-place, stable, uses extra memory, still pretty fast) and
insertionSort(), which is slow except for small arrays.
Object providing in-place sorting capability for arrays.
Sorting.sort() uses quickSort() by default (in-place, not stable, generally fastest but might hit bad cases where it's O(n^2)). Also provides mergeSort() (in-place, stable, uses extra memory, still pretty fast) and insertionSort(), which is slow except for small arrays.