Skip to content

Commit 5aeb10b

Browse files
committed
docs: Improve wording for KMP helper method
1 parent 1713518 commit 5aeb10b

File tree

1 file changed

+2
-2
lines changed
  • src/main/java/algorithms/patternFinding

1 file changed

+2
-2
lines changed

src/main/java/algorithms/patternFinding/KMP.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
*/
4343
public class KMP {
4444
/**
45-
* Captures the longest prefix which is also a suffix for every substring starting at index 0. Does this
46-
* by tracking the number of characters (of the prefix and suffix) matched.
45+
* Captures the longest prefix which is also a suffix for some substring ending at each index, starting from 0.
46+
* Does this by tracking the number of characters (of the prefix and suffix) matched.
4747
*
4848
* @param pattern to search
4949
* @return an array of indices

0 commit comments

Comments
 (0)