Constant time range add operation on an array
You have given an integer array and initially, it was initialized as 0 and also given a range. The task is to add the given number in the range of the array and print the resultant array. Example arr[] = {0, 0, 0, 0, 0} Query: {(0, 2, 50), (3, …