Mental Model
We keep track of sums of numbers from the start to each position and use a map to find if a subarray sums to k quickly.
Analogy: Imagine walking along a path and counting steps. If you know how many steps you took at two points, subtracting them tells you how many steps you took between those points.
Array: [1] -> [2] -> [3] -> [4] -> [5] Prefix sums: 0 -> 1 -> 3 -> 6 -> 10 -> 15 HashMap stores sums seen so far with their counts.
