DiegoCosta's blog

By DiegoCosta, history, 6 years ago, In English

Hello guys,

I'm try to learn Suffix Array, but I can't understand how to build SA in O(nlogn) and O(n). Someone can explain or share a link some tutorial how to do this?

Thanks. :D

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it

By DiegoCosta, history, 6 years ago, In English

Hello Guys.

I'm novice at competitive programming. I'm trying to learn LCA. Firstly I learned LCA O(n) going up the nodes (u and v) linearly. After I learned LCA O(sqrt(n)) using sqrt-decomposition spliting the graph in buckets. Now I trying learning the LCA using Sparse Table, but I don't understand how this tecninque works. Someone can explain me, and shows the implementaion or pseude-code ?

P.S.: Sorry my english. LOL :)

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it