Hello, CF.
I was working on this problem. I know that this problem uses some variation of KMP to solve it. However I can't think of a linear time algorithm for it. Any help will be appreciated. Thanks.
KMP problem.
Hello, CF.
I was working on this problem. I know that this problem uses some variation of KMP to solve it. However I can't think of a linear time algorithm for it. Any help will be appreciated. Thanks.