isSubstring(String A, String B) {
for i = 0 to len(A)-len(B) {
j = 0;
while j < len(B) and A[i+j] == B[j] {
j = j + 1;
}
if j == len(B) {
return True;
}
}
return False;
}
Created
July 23, 2014 07:32
-
-
Save douglas-vaz/9917138cb70169f645ec to your computer and use it in GitHub Desktop.
Bruteforce substring check
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment