Nagarro Interview Question

Sum of subarray in a given array