JumpSearch Algorithm (BUG FOUND)

public class JumpSearch {
    public int jumpsearch(int[]array, int target) {
        int blockSize = (int) Math.sqrt(array.length);
        int start = 0;
        int next = blockSize;
        while (start < array.length && array[next - 1] < target) {
            start = next;
            next += blockSize;
            if (next > array.length)
                next = array.length;
        }
        for (var i = start; i < next; i++)
            if (array[i] == target)
                return i;
        return -1;
    }


}
Test case failed: 
Array : int[] array = {2,8,7,9,15,19}; " unsorted "

var index = search.jumpsearch(array,7);
System.out.println(index);


As with many of these searching algorithms, it does require the input array to be sorted. Mosh forgot to mention that. But if you have unorganized input you cannot do better than O(n) because you basically have to look at every element so there is no reason to do anything other than linear search for unorganized input. He should have mentioned it explicitly, but it is not technically a bug.