ybc_c's blog

By ybc_c, 10 years ago, In English

Hi All :-)

I think some of you may read this problem from hackerrank. Here is the link:

https://www.hackerrank.com/challenges/dynamic-programming-classics-the-longest-common-subsequence

Since the test data is so weak, the traditional O(mn) solution can pass all the test data. So let's assume the two strings can be as long as 10^5. In this case, how to solve this problem? I guess the time complexity of the solution should be O(500*10^5) but have no idea to code it ... :-(

Full text and comments »

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