Explanation of Range Update and Range Query using 2D BIT

Can somebody please explain this Solution of Chef and Matrix Queries

It uses the 4 2D-BIT to update and query both over a range

2 Likes