Please_Read's blog

By Please_Read, history, 2 years ago, In English

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?

  • Vote: I like it
  • -10
  • Vote: I do not like it

| Write comment?
»
2 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

By KMP, it can be optimized to O(n). See 159827269