Skip to content
ı
Workspace
Visualizer
Search anything…
⌘ K
Desk
Path
Problems
Review
More
Library
/
Z-Algorithm
strings
Best
O(n)
Avg
O(n)
Worst
O(n)
Space
O(n)
Preparing Z-Algorithm...
Computes longest prefix match lengths (Z-array) for all suffixes of a concatenated pattern string.