Ayush7614 / Ayush7614/Daily-Coding-DS-ALGO-Practice

Z algorithm

Open
#391 5 comments 0 reactions 2 assignees Claimed by @samarth533 View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.