Deep Dive
Prefix Sum + Hash Map
560. Subarray Sum Equals K · Arrays & Strings · 3 of 78
1/8
Count stretches adding to 3
In this lessonStep 1 of 8 · ← → keys
The question
Count the subarrays whose sum equals k, even with negative numbers.
560. Subarray Sum Equals K · Arrays & Strings · 3 of 78
Count stretches adding to 3
Count the subarrays whose sum equals k, even with negative numbers.