Skip to content

Commit 1fc0972

Browse files
authored
Merge pull request #1081 from mhayter/patch-4
Display issue (spaces vs tabs) with z_function
2 parents 76c6606 + 31c757f commit 1fc0972

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/string/z-function.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ vector<int> z_function(string s) {
9393
vector<int> z(n);
9494
int l = 0, r = 0;
9595
for(int i = 1; i < n; i++) {
96-
if(i < r) {
96+
if(i < r) {
9797
z[i] = min(r - i, z[i - l]);
98-
}
98+
}
9999
while(s[z[i]] == s[i + z[i]]) {
100100
z[i]++;
101101
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy