Question 71
HardWhat does the DP for the longest common substring (not subsequence) store in dp[i][j]?
- A.
Whether a[i] = b[j]
- B.
The length of the common suffix of a[:i] and b[:j], reset to 0 on a mismatch
- C.
The edit distance
- D.
The LCS length of the prefixes
Sign up free to see the answer and a step-by-step explanation.