Skip to content

Conversation

@alaouimehdi1995
Copy link
Contributor

The program now returns the entire longest increasing subsequence instead of returning only the length. Also: Code optimized and entirely explained in comments

The problem is :
Given an ARRAY, to find the longest and increasing sub ARRAY in that given ARRAY and return it.
Example: [10, 22, 9, 33, 21, 50, 41, 60, 80] as input will return [10, 22, 33, 41, 60, 80] as output
'''
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please mention time and space complexity of the code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just finished some optimizations on complexity, it was, on the worst case O(2^(n-1)), but now, I think that in the worst case, it's O(nlog(n)), if I'm wrong, please correct me.

@dynamitechetan dynamitechetan merged commit 7814b28 into TheAlgorithms:master Apr 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants