1546. Maximum Number of Non-Overlapping Subarrays With Sum Equals Target
https://leetcode.com/problems/maximum-number-of-non-overlapping-subarrays-with-sum-equals-target
Description
Given an array nums
and an integer target
.
Return the maximum number of non-empty non-overlapping subarrays such that the sum of values in each subarray is equal to target
.
Example 1:
Example 2:
Example 3:
Example 4:
Constraints:
1 <= nums.length <= 10^5
-10^4 <= nums[i] <= 10^4
0 <= target <= 10^6
ac
Last updated