Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7bf681a

Browse files
authored
Correct grammar issue in the Manacher algorithm (#644)
1 parent 440dbe3 commit 7bf681a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/string/manacher.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ So, we want to calculate $d_1[i]$ for the next $i$, and all the previous values
107107
}\_\text{try moving here}
108108
$$
109109
110-
It is shown in the illustration that though the palindrome with center $j$ could be larger and go outside the "outer" palindrome, but with $i$ as the center we can use only the part that entirely fits into the "outer" palindrome. But the answer for the position $i$ ($d_1[i]$) can be much bigger that this part, so next we'll run our trivial algorithm that will try to grow it outside our "outer" palindrome, i. e. to the region "try moving here".
110+
It is shown in the illustration that though the palindrome with center $j$ could be larger and go outside the "outer" palindrome, but with $i$ as the center we can use only the part that entirely fits into the "outer" palindrome. But the answer for the position $i$ ($d_1[i]$) can be much bigger than this part, so next we'll run our trivial algorithm that will try to grow it outside our "outer" palindrome, i. e. to the region "try moving here".
111111
112112
Again, we should not forget to update the values $(l, r)$ after calculating each $d_1[i]$.
113113

0 commit comments

Comments
 (0)