public static void insertionSort(double[] x, int start, int end)
    {
        for (int i = start; i < end; i++)
            for (int j = i; j > start && x[j - 1] > x[j]; j--)
                swap(x, j, j - 1);
    }
public static void insertionSort ( double [ ] x , int start , int end ) { for ( int i = start ; i < end ; i ++ ) for ( int j = i ; j > start && x [ j - 1 ] > x [ j ] ; j -- ) swap ( x , j , j - 1 ) ; }
@param x
@param start inclusive
@param end exclusive