4 QUESTIONS
Q1 1 / 4 medium
Prefix Sums
Given an array of n integers and q queries, each asking for the sum of elements in range [l, r], answer all queries efficiently.
What is the key data structure or technique required?
Given an array of n integers and q queries, each asking for the sum of elements in range [l, r], answer all queries efficiently.
What is the key data structure or technique required?