Hacktoberfest2022-DSA icon indicating copy to clipboard operation
Hacktoberfest2022-DSA copied to clipboard

Longest Increasing Subsequence II (Leetcode) in C++

Open Anurodhac opened this issue 2 years ago • 1 comments

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 avatar Oct 14 '22 15:10 Anurodhac

I know the solution, Please assign me this issue.

CODER-AsHuToSh avatar Oct 16 '22 17:10 CODER-AsHuToSh