Objective
A subsequence is obtained by deleting characters without changing the order of the others (they need not be contiguous). With a table dp[i][j] you compute the length of the longest common subsequence of the prefixes of both strings.
Instructions
- Read two lines of text (no spaces, not empty).
- Show
Length: nwith the length of their longest common subsequence.
abcde
ace
Length: 3
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise