akshitagit / akshitagit/Python

LONGEST INCREASING SUBSEQUENCE

Ouverte
#71 2 commentaires 0 réactions 1 personne assignée Réclamée par @aswarth123 Voir sur GitHub
algorithms datastructures DSA good first issue hacktoberfest hacktoberfest2020 hactoberfest INTERVIEW-QUESTION
Langage dominant
Python
Étoiles
124
Forks
109
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Find the length of the longest subsequence in a given array A of integers such that all elements of the subsequence are sorted in strictly ascending order.
Input Format

The first line contains a single integer n.
Next line contains n space separated numbers denoting the elements of the array.
Constraints

0 < n< 105
0 < Ai < 105
Output Format

Print a single line containing a single integer denoting the length of the longest increasing subsequence.
Sample Input

6
50 3 10 7 40 80

Sample Output

4

Explanation

The longest subsequence in test case is - 3,7,40,80

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.