# Subarray Sum Equals K
Given an integer array `nums` and an integer `k`, return the number of contiguous subarrays whose elements sum to exactly `k`.
The hashmap-as-lookup-table pattern from Module 0's HashMap lesson, applied to running (prefix) sums instead of raw values: a subarray `[i+1..j]` sums to `k` exactly when `prefix[j] - prefix[i] == k`.
**Example:** `nums=[1,1,1], k=2` -> `2`.
Target complexity: O(N) time, O(N) space.