Deep Dive

Prefix Sum + Hash Map

560. Subarray Sum Equals K · Arrays & Strings · 3 of 78

1/8

Count stretches adding to 3

102112-132415
In this lessonStep 1 of 8 · ← → keys
The question

Count the subarrays whose sum equals k, even with negative numbers.