Longest Increasing Subsequence · Compiler
Longest Increasing Subsequence
Find the longest strictly increasing subsequence. You may skip elements, but the chosen elements must stay in their original order and each must exceed the one before it.
- Input
- Line 1 contains the length n (1 to 100). Line 2 contains n space-separated integers, each from -1000 to 1000.
- Output
- Print the maximum possible number of chosen elements.
Compiler Explorer runs your code when you run or check it.
Loading your exercise draft…