Skip to content
CampusEduX

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.

Related Problems

  • House Robber
    Medium · java, python, c, cpp, javascript
    Solve Problem
  • 0/1 Knapsack
    Medium · java, python, c, cpp, javascript
    Solve Problem
  • Longest Common Subsequence
    Medium · java, python, c, cpp, javascript
    Solve Problem

Input (stdin)

Output

Run your code to see output here...