How is the input [10, 9, 2, 5, 3, 7, 101, 18] should return 3, it has only at max 3 continuous which is 3.7,101 where is o/p of 4 is expected 2,3,7,101 how is it possible?
Q300 Longest Increasing Subsequence

In mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements. For example, the sequence { A,B,D} is a subsequence of { A,B,C,D,E,F} . They should not be confused with substring which is {A,B,C,D} for above string and which is a refinement of subsequence. From https://en.wikipedia.org/wiki/Subsequence