Longest increasing subsequence: Return the length of the longest strictly increasing subsequence in nums. The subsequence does not need to be contiguous.
Input: A JSON object { "nums": number[] }.
Output: A JSON integer.
Constraints:
- 0 <= nums.length <= 100000
- Values may repeat and may be negative
- Strictly increasing means equal values cannot extend a subsequence
Read one JSON value from stdin and print exactly one JSON-serialized answer to stdout with no extra text.
Difficulty: HARD. Variant: 24. Favor a pragmatic solution that is easy to ship, read, and adapt.
Practice context
This coding (algo) exercise trains prompt interpretation, explicit assumptions, a concrete response, and a concise explanation of the decisions made. It is marked hard difficulty.
The signed-in workspace provides the tools required by the round, such as recording, code execution, diagrams, struct