Script Output: The entire longest increasing subsequence instead of it's length#74
Merged
dynamitechetan merged 3 commits intoTheAlgorithms:masterfrom Apr 10, 2017
Merged
Conversation
… returning only the length. Code optimized and well commented
ankit167
reviewed
Apr 7, 2017
| 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 | ||
| ''' |
There was a problem hiding this comment.
Please mention time and space complexity of the code
Contributor
Author
There was a problem hiding this comment.
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
approved these changes
Apr 10, 2017
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The program now returns the entire longest increasing subsequence instead of returning only the length. Also: Code optimized and entirely explained in comments