I can’t visualize how the cumulative sum is the required answer and why not query(pos) - query(pos-1) not the answer?
BIT 09 Update It
Please add the problem link.
I can’t visualize how the cumulative sum is the required answer and why not query(pos) - query(pos-1) not the answer?
Please add the problem link.