Cycle Sort.
An in-place, unstable sorting algorithm that minimizes the number of memory writes. Optimal when write cost is expensive. Performs O(n²) comparisons and O(n) writes in all cases.
Sorts the array in ascending natural order.
Sorts an IntArray in ascending order.
Sorts the array using the given comparator.