Блог пользователя sajalhsn13

Автор sajalhsn13, история, 8 лет назад, По-английски

Hello everyone,

I am trying to solve this problem. If I can build the LCP array with O(n) complexity I can easily solve it. But building LCP array requires suffix array. I know the O(n*logn*longn) algorithm. But It will give me TLE in this problem. I need the O(n) algorithm to build suffix array. I searched for it and get a paper which is too complex to understand for me. Can anyone give me a simple and well explained tutorial to build suffix array with O(n) time? It will be great help for me.

Thank you.

  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +35 Проголосовать: не нравится

You should also try solving with the algorithm. Its constant is very good in comparison with the O(n) one, and it may pass.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +32 Проголосовать: не нравится

No, you don't need suffix array. Try to learn easier techniques