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
Number of pairs#5947
Very hard
Contemporary Art#5990
Medium
Mega Inversions#6021
Very easy
Sorting#6066
Very easy
Sum#6088
Very easy
Control Block#6100
Very easy
Sequence#6136
Medium
Fenwick Tree#6233
Very easy
Magic Roads#6451
Very easy
Danger#6455
Very easy
DVDs#6577
Very easy
Arranging Heaps#6595
Very hard
Folded Map#6614
Easy
Minimal Subarray Length#6951
Very easy