In this question we need to update the range from l to r with a value and then print any ith element from the array.
Update part is easy but in the query part, the video says that we will print the cumulative sum till the ith element.
But that will give me the cumulative sum and the question says that we need to print the ith element, for ex i want to print 7th element, then according to algo, the code will print range(1-4)+range(5-6)+range(7). But thats the cumulative sum, i want to print 7th element.