Computing Z-Values in O(n) - Z-Algorithm: Linear-Time Pattern Matching | OneNoughtOne