Skip to content
C

Longest Increasing Subsequence

Mediumjavapythonccppjavascript

Given an integer array, find the length of the longest subsequence in which each element is strictly greater than the previous one.

Input Format

The first line contains an integer N. The second line contains N space-separated integers.

Output Format

Print the length of the longest strictly increasing subsequence.

Input (stdin)

Output

Run your code to see output here...