Wednesday, April 13, 2016

HackerRank: String Calculate function (III) - LCP array

April 13, 2016

Still work on the problem:

Problem statement:

https://www.hackerrank.com/challenges/string-function-calcula


Put together 2-3 hours on LCP array study first, and then, work out a solution for this advanced algorithm.


The LCP-LR array helps improve this to O(m+logN)O(m+logN), in the following way


LCP array reading
https://www.hackerrank.com/challenges/pseudo-isomorphic-substrings/topics/lcp-array

https://en.wikipedia.org/wiki/LCP_array

Question and Answer:

Before you write LCP implementation, tell me what you learn about LCP, give me an example you work on? 

No comments:

Post a Comment