Skip to content

Commit 2b1100e

Browse files
committed
fix for manacher?
1 parent 71fa2f6 commit 2b1100e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/strings/manacher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fn main() {
1111
let man = manacher(&s.chars().collect::<Vec<_>>())
1212
.iter()
1313
.enumerate()
14-
.map(|(i, &x)| i - 2 * x + 1)
14+
.map(|(i, &x)| i + 1 - 2 * x)
1515
.collect::<Vec<_>>();
1616

1717
println!(

0 commit comments

Comments
 (0)