Leetcode

1695. Maximum Erasure Value

Understanding the Problem Given an array of integers nums, our task is to find the maximum sum of a contiguous subarray containing only unique elements. Approach We can solve this problem using a sliding window approach. We’ll maintain two pointers, start and end, to define the current subarray. Additionally, we’ll use a HashSet to keep…

Leetcode

76. Minimum Window Substring

The Minimum Window Substring problem is a classic problem in string manipulation and is frequently encountered in coding interviews and real-world applications. In this blog, we’ll explore the problem, understand its solution, and discuss the implementation details. Problem Statement Given two strings s and t, we are tasked with finding the minimum window substring of…