Find the length of the longest increasing subsequence in the given array.
a=[2,4,2,1,3,5,6]
longest increasing subsequence = [2,4,5,6]
= [1,3,5,6]
= [2,3,5,6]
so, length = 4
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers24
Suggested Problems
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
2052 Solvers
-
246 Solvers
-
Find the sum of the elements in the "second" diagonal
1204 Solvers
-
Create an n-by-n null matrix and fill with ones certain positions
727 Solvers
-
Sums of cubes and squares of sums
375 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!