Ayush7614 / Ayush7614/Daily-Coding-DS-ALGO-Practice
Z algorithm
Open
LGMSOC21
🟨 Level2
- Dominant language
- C++
- Stars
- 323
- Forks
- 472
- PR merge metrics
- No merged PRs in 30d
Description
This algorithm finds all occurrences of a pattern in a text in linear time. For a string str[0..n-1], Z array is of same length as string. An element Z[i] of Z array stores length of the longest substring starting from str[i] which is also a prefix of str[0..n-1].
### Programming language
- [ ] C
- [ ] C++
- [ ] Java
- [x] Python
Contributor guide
Assessment
This issue has not been assessed yet.