The problem descriptions says:

Given [10, 9, 2, 5, 3, 7, 101, 18].

The longest increasing subsequence is [2, 3, 7, 101], therefore the length is 4.

However, this is incorrect. The provided subsequence is missing the 5 that has mysteriously disappeared.

In fact, the longest increasing subsequence here is is [3, 7, 101] of length 3.

Am I missing something or is the question phrased inappropriately?

Thank you!