Multiple ChoiceIntermediate 30s
Prefix sum array
Prefix sum enables:
Options
- 1Sorting arrays in linear O(n) time overall
- 2Traversing graphs in breadth-first order
- 3Range sum queries in O(1) after O(n) preprocessing
- 4Matching patterns in strings with hashing
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.