In problem F, the rotation of string will cost o(n^2) time. it's ok for this problem. But I want to know is there any o(n) approach to do this work?
Last div-3 F problem
In problem F, the rotation of string will cost o(n^2) time. it's ok for this problem. But I want to know is there any o(n) approach to do this work?