Longest Common Subsequence
medium
1. You are given a string str1. 2. You are given another string str2. 3. You are required to print the length of longest common subsequence of two strings.
Constraints
0 <= str1.length <= 10 0 <= str2.length <= 10
Format
Input
A string str1 A string str2
Output
A number representing the length of longest common subsequence of two strings.
Example
Sample Input
abcd
aebd
Sample Output
3
Question Video