Quiz on Prefix Sum for DSA: Question 5

Last Updated :
Discuss
Comments

What is the time complexity of querying the sum of elements in a subarray after constructing the prefix sum array?


O(n)

O(n^2)

O(log n)

O(1)

Tags:
Share your thoughts in the comments