## DESCRIPTION Z algortrithm is used for the string matching. Its time complexity is similar to the kmp algorithm and its equal to log(n+m). I would code in C++.