Skip to content

Commit

Permalink
Fix minPeriod
Browse files Browse the repository at this point in the history
  • Loading branch information
indy256 committed Sep 11, 2022
1 parent 6cbe563 commit 31da128
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/strings/Kmp.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static int minPeriod(String s) {
int minPeriod = n - maxBorder;

// check periodicity
// if (n % minPeriod != 0) return -1;
// if (minPeriod < n && n % minPeriod != 0) return -1;

return minPeriod;
}
Expand Down

0 comments on commit 31da128

Please sign in to comment.