All challenges
Multiple ChoiceIntermediate 30s

Prefix sum array

Prefix sum enables:
Options
  1. 1Sorting arrays in linear O(n) time overall
  2. 2Traversing graphs in breadth-first order
  3. 3Range sum queries in O(1) after O(n) preprocessing
  4. 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.

Play this in a 3-minute battle