0560. Subarray Sum Equals K
https://leetcode.com/problems/subarray-sum-equals-k
Description
Given an array of integers nums
and an integer k
, return the total number of continuous subarrays whose sum equals to k
.
Example 1:
Example 2:
Constraints:
1 <= nums.length <= 2 * 104
-1000 <= nums[i] <= 1000
-107 <= k <= 107
ac
similar: https://leetcode.com/problems/maximum-size-subarray-sum-equals-k/description/
Last updated