I am solving some string problems and recently encountered this problem Text Editor.
I am creating a new string and then I am calculating the Z array for that string. I am getting WA, and since it's a GYM problem, I am not able to know whether I am looking in the right direction.I can not find any Editorial for the same. Can you provide some idea to solve it? The link to my Solution.