public static int[] isSorted(final int[] array) {
        int last = array[0];
        for (int value : array) {
            if (value < last) {
                throw new RuntimeException("Data is not correctly sorted");
            }
            last = value;
        }
        return array;
    }