Prefix Sums
Problems on prefix sums, including the sum of any subarray in constant time, two-dimensional sums over rectangles, difference arrays for range updates, counting subarrays with a given sum and balancing a sequence.
The prefix sums article in the Basics section explains the technique. Related problem sets are under Two pointers, Fenwick tree and Range queries.
Problems
Dancing school#160
Medium
Sails#282
Hard
Computer Network#534
Medium
Sum on a segment#682
Very easy
Sum in a matrix#684
Very easy
Range Variation Query#695
Very easy
Matrix Summation#861
Very easy
Cards#1026
Hard
Monsters#1175
Hard
Substrings#1179
Very easy
Rock of Advice#1415
Very easy
Battleship#1476
Very easy
Water#1496
Hard
Divisors#1569
Very easy
Be Efficient#1570
Very easy
The sum from 1 to n#1621
Medium
Sim-sim#1673
Medium
Honest Chain#1679
Very easy