Skip to content

LONGEST INCREASING SUBSEQUENCE #40

Open

Description

@akshitagupta15june

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

Activity

  1. dolonmandal commented on Sep 26, 2020

    @dolonmandal

    I would like to work on this as a part of hacktober fest 2020. Can you please assign it to me.

  2. akshitagupta15june commented on Sep 26, 2020

    @akshitagupta15june
    MemberAuthor

    Yes Ofcourse

  3. dolonmandal commented on Sep 26, 2020

    @dolonmandal

    should it be strictly javascript or can I use c++?

  4. akshitagupta15june commented on Sep 26, 2020

    @akshitagupta15june
    MemberAuthor

    If you want to add in cpp then please go to cpp repo Where there is the same issue raised

  5. raman-thakur commented on Sep 26, 2020

    @raman-thakur

    i can do this using java script!!

    can you pls assign it to me for the hacktober fest 2020???

  6. akshitagupta15june commented on Sep 26, 2020

    @akshitagupta15june
    MemberAuthor

    ok assigning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions