InPlaceStableMergeSort

A stable merge sort implementation that uses at most O(log(n)) memory and O(n*log(n)*log(n)) time.

Methods
static void sort(T[] data, Comparator comp)
Sort an array using the given comparator.
static void sort(T[] data, Comparator comp)
Sort an array using the given comparator.
Parameters:
data - the data array to sort
comp - the comparator
void mergeSort(int from, int to)
Sort a block recursively using merge sort.
void mergeSort(int from, int to)
Sort a block recursively using merge sort.
Parameters:
from - the index of the first entry to sort
to - the index of the last entry to sort
void sortArray(T[] d, Comparator c)
Sort an array using the given comparator.
void sortArray(T[] d, Comparator c)
Sort an array using the given comparator.
Parameters:
d - the data array to sort
c - the comparator