Given an array of integers, find the longest increasing subsequence.
A subsequence is just a collection of numbers from the array - however, they must be in order.
For example:
Array:
The longest increasing subsequence here is (or , or ).
The numbers must be strictly increasing - no two numbers can be equal.
Input Specification
, the number of integers.
lines, each with a value in the array.
Output Specification
The length of the longest increasing subsequence of the array.
Comments