akshitagit / akshitagit/Python

LONGEST INCREASING SUBSEQUENCE

Aperta
#71 2 commenti 0 reazioni 1 assegnatario Rivendicata da @aswarth123 Vedi su GitHub
algorithms datastructures DSA good first issue hacktoberfest hacktoberfest2020 hactoberfest INTERVIEW-QUESTION
Lingua principale
Python
Stelle
124
Fork
109
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.