From 31c757ff7f5d22f103126d5004b9d81d653309bf Mon Sep 17 00:00:00 2001 From: Michael Hayter Date: Wed, 26 Apr 2023 04:45:02 -0400 Subject: [PATCH] Display issue (spaces vs tabs) with z_function Both Brave and Edge show spacing issue. --- src/string/z-function.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/string/z-function.md b/src/string/z-function.md index 87027e2f0..632eddc43 100644 --- a/src/string/z-function.md +++ b/src/string/z-function.md @@ -93,9 +93,9 @@ vector z_function(string s) { vector z(n); int l = 0, r = 0; for(int i = 1; i < n; i++) { - if(i < r) { + if(i < r) { z[i] = min(r - i, z[i - l]); - } + } while(s[z[i]] == s[i + z[i]]) { z[i]++; } 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