Deviopath › JavaScript

Longest Increasing Subsequence

Hard · Dynamic Programming

Write a function lisLength that returns the length of the longest strictly increasing subsequence of nums.

A subsequence keeps the original order but can skip elements. Equal numbers do not count as increasing. For an empty array return 0.

Next: 0/1 Knapsack