Skip to content

Added Unicode test to strings/rabin_karp.py #1096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 5, 2019
7 changes: 7 additions & 0 deletions strings/rabin_karp.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ def test_rabin_karp():
pattern = "abcdabcy"
text = "abcxabcdabxabcdabcdabcy"
assert rabin_karp(pattern, text)

# Test 5)
pattern = "Lü"
text = "Lüsai"
assert rabin_karp(pattern, text)
pattern = "Lue"
assert not rabin_karp(pattern, text)
print("Success.")


Expand Down