Problem of the day
Subsequences of string "abc" are: ""(empty string), a, b, c, ab, bc, ac, abc.
The first line of input contains the string 'S' of length 'M'.
The second line of the input contains the string 'T' of length 'N'.
Return the length of the Longest Common Subsequence.
0 <= M <= 10 ^ 3
0 <= N <= 10 ^ 3
Time Limit: 1 sec
adebc
dcadb
3
Both the strings contain a common subsequence 'adb', which is the longest common subsequence with length 3.
ab
defg
0
The only subsequence that is common to both the given strings is an empty string("") of length 0.