Merge Sort.
A divide-and-conquer algorithm that recursively splits the array in half, sorts each half, then merges them back together. Guarantees O(n log n) time in all cases with O(n) extra space.
Sorts the array in ascending natural order.
Sorts an IntArray in ascending order.
Sorts the array using the given comparator.