This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingFind the length of the longest strictly increasing subsequence of a row of numbers.
What this asks
Find the length of the longest strictly increasing subsequence of a row of numbers.
dp[i] is the longest strictly increasing run that ends at index i: one plus the largest dp[j] over the earlier indexes whose number is smaller, or 1 when none is. The answer is the largest entry in the row, not the last one.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing