Solved Problem - Subarray Sum
In this lesson, we'll see an effective way to compute sum of an subarray.
We'll cover the following...
Problem statement
Given an array, , of integers, answer queries of the type - sum of the elements in the subarray . Print the sum for each query.
Input format
The first line contains two space-separated integers and .
The second line contains integers representing the array ...