private static <T extends Comparable<? super T>> void insertionSort(T[] a, int low, int high) {
        for (int i = low + 1; i <= high; i++) {
            T temp = a[i];
            int j = i;
            while (j > 0 && compare(temp, a[j - 1]) < 0) {
                a[j] = a[j - 1];
                j--;
            }
            a[j] = temp;
        }
    }