LeetCode #435: Non-overlapping Intervals
https://leetcode.com/problems/non-overlapping-intervals/description/ Given a collection of intervals, find the minimum number of intervals you need to remove to make the rest…
Step by step guide to LeetCode solutions.
https://leetcode.com/problems/non-overlapping-intervals/description/ Given a collection of intervals, find the minimum number of intervals you need to remove to make the rest…
https://leetcode.com/problems/merge-intervals/description/ In this problem, we have to merge overlapping intervals in a list. We are given a list of intervals…
https://leetcode.com/problems/insert-interval/description/ To solve this problem, we can iterate over the intervals in the list, and compare them with the new…
https://leetcode.com/problems/jump-game/ We can solve this problem using a greedy approach. We can keep track of the furthest index that can…
https://leetcode.com/problems/maximum-subarray/ The problem requires finding the maximum sum of a contiguous subarray. This problem can be solved using the Kadane’s…
https://leetcode.com/problems/longest-common-subsequence/description/ A subsequence is a sequence that can be derived from another sequence by deleting some or no elements without…
https://leetcode.com/problems/unique-paths/description/ To solve this problem, we can use dynamic programming. We create a 2D array path where path[i][j] represents the…
https://leetcode.com/problems/longest-increasing-subsequence/description/ The idea of the solution is to use Dynamic Programming to solve this problem. First, we create a dp…
https://leetcode.com/problems/word-break/ To solve this problem, we can use a backtracking approach that checks all possible combinations of substrings that exist…
https://leetcode.com/problems/maximum-product-subarray/description/ We can solve this problem using Dynamic Programming approach. We will maintain the maximum and minimum subarray product ending…