Skip to main content

Prefix Sum

Precompute cumulative sums to answer range queries in O(1).

7 problems 3 Easy 4 Medium 0 Hard

Problems (7)

Problem Link
Subarray Sum Equals K
Product of Array Except Self
Range Sum Query - Immutable
Contiguous Array
Find Pivot Index
Running Sum of 1D Array
Minimum Average Difference

Enjoying this free content?

If this saved you time, buying me a coffee keeps new content coming.

Buy me a coffee
Buy me a coffee