Number of Longest Increasing Subsequence

Medium · Dynamic Programming · about 25 minutes

Asked at Meta, Google, Amazon, Bloomberg, ByteDance.

Work out how long the longest strictly increasing subsequences of nums are, then count how many there are of that length (subsequences using different positions count separately).

Related guides