Sort by

recency

|

9 Discussions

|

  • + 0 comments

    No worries dude, it was nice when no one did any discussion. I really want to write about this contest on academic writing services uk. But I don’t really know what can be written about the competition.

  • + 0 comments

    On hackerrank it is giving segmentation fault Link : https://www.hackerrank.com/contests/hourrank-11/challenges/tutzki-and-lcs/submissions/code/1308066658

    on Other editors it is correct Link: https://ideone.com/E08TUP

    Someone help!!!

  • + 0 comments

    Having read the editorial, I've just 1 doubt though.. I can't seem to understand as to how dpr[i + 1][x + 1](in the problem setter's code) gives us the value of the LCS of a(i + 1, n) & b(j + 1, m)(according to the editorial).. Please help..

  • + 0 comments

    There may be multiple LCSs possible for a pair of strings. Which LCS will we then take for this case?

  • + 0 comments

    Maybe i'm missing something but trying the code from the editorial with:

    str1="ac", str2="abc" and it returns 1 but

    LCS(str1, str2) = 1 -------(a or c)

    The only way to increment LCS is to put a 'b' in str1 in the 2° position so:

    str1="ac"=========> str1="abc" and now LCS() = 3. In this case LCS is incermented by 2 not by 1 so there is not a way to increment the LCS by 1. So it should return 0.