{ "Z Algorithm": "Finding all the occurances of a pattern (length = M) in a text (length = N) in linear time", "Applications": [ "Substring Search" ], "Complexity": { "time": "worst $O(|M|+|N|)$", "space": "worst $O(|M|+|N|)$" }, "References": [ "GeeksForGeeks" ], "files": { "pattern_search": "Find the occurances and position of a pattern in a text" } }