Longest Common Subsequence

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

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.
Input Format
A string str1
A string str2
Output Format
A number representing the length of longest common subsequence of two strings.
Question Video
Constraints
0 <= str1.length <= 10
0 <= str2.length <= 10
Sample Input
abcd
aebd
Sample Output
3


  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name