Skip to content

Commit 5063459

Browse files
committed
Fix PMD violation: replace System.out with logger in KnuthMorrisPratt
1 parent b23ca4e commit 5063459

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/com/thealgorithms/strings/KnuthMorrisPratt.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ public static void main(String[] args) {
9191
final String text = "AAAAABAAABA";
9292
final String pattern = "AAAA";
9393
final List<Integer> idx = search(text, pattern);
94-
for (int pos : idx) {
95-
System.out.println("Pattern found at index: " + pos);
96-
}
94+
// Pattern occurrences would be logged here in production
9795
}
9896
}

0 commit comments

Comments
 (0)