for i = 1 .. n - k: if (sort(expected[i..i+k]) != sort(actual[i..i+k])): print "Mismatch around line ", i