Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Longest Increasing Subsequence II (Leetcode) in C++ #287

Open
Anurodhac opened this issue Oct 14, 2022 · 1 comment
Open

Longest Increasing Subsequence II (Leetcode) in C++ #287

Anurodhac opened this issue Oct 14, 2022 · 1 comment
Assignees

Comments

@Anurodhac
Copy link

This is a recent leetcode weekly contest hard problem.
Usually, LIS is solved using DP ( O(n^2) Solution ).
In this problem, we could only take elements with differences not more than K and we have to find the longest increasing subsequence.
Constraints are such that we can not use O(n^2) DP approach and we can not as well use binary search optimization of LIS.
So, the Solution is based on Range Max Queries using segment Trees.
Time Complexity of solution: O(nlog(maximum element in the array))*
This solution is accepted on leetcode.

Can you please assign it to me @ritikbanger under hacktober fest tag.

@Anurodhac Anurodhac changed the title Longest Increasing Subsequence II (Leetcode) Longest Increasing Subsequence II (Leetcode) in C++ Oct 14, 2022
@CODER-AsHuToSh
Copy link

I know the solution, Please assign me this issue.

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

No branches or pull requests

2 participants