problem: LCS2 Can someone please suggest a counter case for my solution. It is giving RE on test 0.
when I run your code on ideone, the below test case gives a RE.
abbabbbbbaaaaaaabababbabbabbaabababaaabaa aabaaababbaaaaaabbabbbbbbbbbababbbaabaabbbb baabbbaababbbbaababaabbbbbbaabaabaababb
Thanks for your reply!
I’ve updated the code but now it is giving TLE… but code’s complexity is O(2* n*10 *2). Can you please again help me in optimizing code ?
Sorry, but not a clue.
Did you have any other solution using Suffix Trees to solve the same? If yes then please give a rough sketch of the solution.