https://online.codingblocks.com/player/9269/content/200?s=1278
Hi,
I am not able to understand how This BIT calculating the cumulative sum when we are performing range update on it,
for ex: suppose we have a={1, 7, 3, 5, 2, 9} as we know our BIT contains the sum of indexes on every index
BIT={(1, 1),(1, 2), (3, 3), (1, 4), (5,5) …}
if am performing an update of +10 over the rage (3, 5)
so our array will look like something a ={1, 2, 13, 15, 12, 9}
BIT will contain ={1, 8, 13, 26, 2, 11}.
and suppose my query is: 4 mean I am asking cumulative sum till index 4;
Then BIT returns 26 but the cumulative sum should be 36.
Thank you for any effort in advance.