Hacktoberfest2022-DSA
Hacktoberfest2022-DSA copied to clipboard
Longest Increasing Subsequence II (Leetcode) in C++
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.
I know the solution, Please assign me this issue.