Skip to content

Commit

Permalink
Added Unicode test to strings/rabin_karp.py (TheAlgorithms#1096)
Browse files Browse the repository at this point in the history
* Added print function into matrix_multiplication_addition.py and removed blank space in data_structures/binary tree directory

* Removed .vs/ folder per TheAlgorithms#893

* Rename matrix_multiplication_addition.py to matrix_operation.py

* Unicode test on strings/rabin_karp.py per TheAlgorithms#1067
  • Loading branch information
qckzr authored and cclauss committed Aug 5, 2019
1 parent 87a789a commit 4437439
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit 4437439

Please sign in to comment.