From basic running sums to 2D prefix sums, difference arrays, and hashing tricks for subarray problems.