what kind of loop is it?...
for (int i = fromIndex;; rollingHash = (rollingHash - m * get(i)) * HASH_PRIME + get(i + n), i++) { if (hash == rollingHash && subarrayEquals(subarray, i)) { return i; } if (i + n == size()) { return -1; } }
Yes, I wrote it; but this is the first time I write something like this.