Skip to content

Commit 198d944

Browse files
author
Mrinal Chauhan
committed
fix: updated code to fix run_infer errors
1 parent c0edcc5 commit 198d944

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static List<Integer> findPatternOccurrences(String text, String pattern)
3030
// Modification to handle single and multi-character patterns differently:
3131
// Skip to next position for non-overlapping matches only if pattern length > 1
3232
if (patternLength > 1) {
33-
i += patternLength - 1; // Skip positions for non-overlapping matches
33+
i += patternLength - 1;
3434
}
3535
// For single-character patterns, continue without skipping to capture overlaps
3636
}

0 commit comments

Comments
 (0)