Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1546. Maximum Number of Non-Overlapping Subarrays With Sum Equals Target
Given an array nums and a target, find the maximum number of non-overlapping contiguous subarrays whose sums equal target. The core challenge is detecting subarray sums efficiently (via prefix sums) while choosing disjoint segments greedily or with DP to maximize the count under the non-overlap constraint.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.