Array Manipulation Solution
Suppose you are given with an array filled with all zeroes initially and Q queries. In each of the Q queries, you are given with three integer values L, R and X. You are asked to add the value X in each of the indices from L to R. Now you have to tell the maximum value in the array and at which index ?