please have a look and give me some advice. why can't pass the task while the result is right.
public static void sort(int[] array) {
        //在此编写你的代码
        //insertion sort methord
        int i,j,key;
        for(i = array.length-2; i >= 0; i--)
        {
            key = array[i];
            j = i + 1;
            while(j <= array.length && array[j] > key)
            {
                array[j-1] = array[j];
                j++;
            }
            array[j-1] = key;
        }
    }