Please could anyone explain the O(n) method of Z Array computation. I understood what it is but could not understand how to code it properly. Could anyone help me ? I studied it from codeforces.
Read this [z-algo]
I used this link already for understanding the concept…Thank you…but didn’t understood the code