Skip to content

Commit f7233ee

Browse files
committed
fix: Correct expected output in doctest
1 parent 8de8136 commit f7233ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

strings/knuth_morris_pratt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def knuth_morris_pratt_search(text: str, pattern: str) -> list[int]:
6464
6565
>>> # Test cases from the original file
6666
>>> knuth_morris_pratt_search("alskfjaldsabc1abc1abc12k23adsfabcabc", "abc1abc12")
67-
[10]
67+
[14]
6868
>>> knuth_morris_pratt_search("alskfjaldsk23adsfabcabc", "abc1abc12")
6969
[]
7070
>>> knuth_morris_pratt_search("ABABZABABYABABX", "ABABX")
@@ -81,7 +81,7 @@ def knuth_morris_pratt_search(text: str, pattern: str) -> list[int]:
8181
>>> knuth_morris_pratt_search("knuth_morris_pratt", "h_m")
8282
[4]
8383
>>> knuth_morris_pratt_search("knuth_morris_pratt", "rr")
84-
[12]
84+
[8]
8585
>>> knuth_morris_pratt_search("knuth_morris_pratt", "tt")
8686
[16]
8787
>>> knuth_morris_pratt_search("knuth_morris_pratt", "not there")

0 commit comments

Comments
 (0)