Given two sequences, find the length of the longest common subsequence.
a=[1,1,1,1,1,2,3,1,4]
b=[2,3,0,0,9,5,4,1]
longest Common subsequence = [2,3,4]
= [2,3,1]
so,length=3
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers22
Suggested Problems
-
Replace NaNs with the number that appears to its left in the row.
3064 Solvers
-
First non-zero element in each column
942 Solvers
-
Change the first and last diagonal element of the identity matrix to zero
160 Solvers
-
268 Solvers
-
Highly divisible triangular number (inspired by Project Euler 12)
164 Solvers
More from this Author174
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!