1477 LeetCode problem solution
LeetCode 1477 Find Two Non-overlapping Sub-arrays Each With Target Sum solution using Sliding Window and Prefix Minimum patterns. In this solution we have O(n) time and space complexity.
Read moreLeetCode 1477 Find Two Non-overlapping Sub-arrays Each With Target Sum solution using Sliding Window and Prefix Minimum patterns. In this solution we have O(n) time and space complexity.
Read moreLeetCode 1621 Number of Sets of K Non-Overlapping Line. Segments solution using combinatorics and endpoint transformation.
Read moreLeetCode 2472 Maximum Number of Non-overlapping Palindrome Substrings solution using Dynamic Programming and Palindrome Checking. The key idea is to check only palindromes of length k and k + 1 to find the maximum number of non-overlapping substrings efficiently.
Read moreLeetCode 560 Subarray Sum Equals K solution using Prefix Sum and Hash Map. For each prefix sum, we look for currentSum - k to count valid subarrays in O(n) time.
Read moreIs writing LeetCode tutorials still worth it in the age of AI? I share real SEO results from my coding website, Google search performance, traffic, and what I learned from the experiment.
Read more