Please read the new rule regarding the restriction on the use of AI tools. ×

coder_1560's blog

By coder_1560, history, 8 years ago, In English

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.

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
8 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Try to think about differences of adjacent elements