Backend Developer
Prefix Sums questions
23 questions on Prefix Sums for backend developers, easiest first.
Easy 6
Medium 9
- Apply two range incrementsmedium
- Rectangle sum from a 2D prefix tablemedium
- Find the pivot indexmedium
- Prefix sums overflowing intmedium
- XOR of a rangemedium
- Minimum starting balancemedium
- Count subarrays that sum to kmedium
- Longest subarray with equal 0s and 1smedium
- Subarrays with sum divisible by kmedium
Hard 8
- Product of array except selfhard
- Shortest subarray with sum at least K, with negativeshard
- Sum of all subarray sumshard
- Running totals of rupee amountshard
- Range updates mixed with range querieshard
- Prefix count updated too earlyhard
- First or last index of a prefix sumhard
- Counting balanced 0 and 1 subarrayshard