Quiz on Prefix Sum for DSA: Question 8

Last Updated :
Discuss
Comments

How do you calculate the sum of elements in a subarray using the prefix sum array?

By directly summing the elements of the subarray

By multiplying the prefix sum values at the left and right boundaries

By subtracting the prefix sum value of the left boundary index from the prefix sum value of the right boundary index

By dividing the prefix sum values at the left and right boundaries

Tags:
Share your thoughts in the comments