Content-Length: 262202 | pFad | http://github.com/cp-algorithms/cp-algorithms/commit/65aa1c028cd3ba42f72ec2d737f9c43e549cdbf2

2A Fixing Typo (#244) · cp-algorithms/cp-algorithms@65aa1c0 · GitHub
Skip to content

Commit 65aa1c0

Browse files
joaquingxjakobkogler
authored andcommitted
Fixing Typo (#244)
1 parent 9174567 commit 65aa1c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/string/prefix-function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ We generate the string $s + \\# + t$, where $\\#$ is a separator that appear in
132132
Let us calculate the prefix function for this string.
133133
Now think about the meaning of the values of the prefix function, except for the first $n + 1$ entries (which belong to the string $s$ and the separator).
134134
By definition the value $\pi[i]$ shows the longest length of a substring ending in position $i$ that coincides with the prefix.
135-
But in our case this is is nothing more than the largest block that coincides with $s$ and ends at position $i$.
135+
But in our case this is nothing more than the largest block that coincides with $s$ and ends at position $i$.
136136
This length cannot be bigger than $n$ due to the separator.
137137
But if equality $\pi[i] = n$ is achieved, then it means that the string $s$ appears completely in at this position, i.e. it ends at position $i$.
138138
Just do not forget that the positions are indexed in the string $s + \\# + t$.

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/cp-algorithms/cp-algorithms/commit/65aa1c028cd3ba42f72ec2d737f9c43e549cdbf2

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy