comeoncodeon.wordpress.com
The Z Algorithm
In this post we will discuss an algorithm for linear time string matching. It is easy to understand and code and is usefull in contests where you cannot copy paste code. Let our string be denoted b…