atcoder.string.z_algorithm

atcoder.string.z_algorithm(s: str | List[int]) List[int]

Z algorithm Reference: D. Gusfield, Algorithms on Strings, Trees, and Sequences: Computer Science and Computational Biology