Given 2 strings, remove the minimum number of chracters from both of them to make them equal

ANS: (string1.length() - LCS + string2.length() - LCS)

LCS:

dp[i][j] = max(dp[i - 1][j], dp[i][j - 1])
if row char == col char:
    dp[i][j] = max(dp[i][j], dp[i - 1][j - 1] + 1)

results matching ""

    No results matching ""