Members
length
2 overloads
For simplicity will start with solely calculating the length of the Longest Increasing Subsequence(which is essentially equivalent, but simplifies the code by removing the the parent overhead code).
@complexity
O(|A|^2)
@paramA
string
sequence
@returns
the length of a longest (not necessarily contiguous) subsequence of A that strictly increases
@paramA
number[]
@returns
number
get
2 overloads
in the following function we store the parent pointers while calculating the length, and then reconstruct subsequence.
@paramA
string
sequence
@returns
the longest subsequence of A that strictly increases
@paramA
number[]
@returns
number[]