Given a 2D matrix, implement:
update(row, col, val): Update matrix[row][col] to valsumRegion(row1, col1, row2, col2): Return sum of rectangle You're solving the same problem from segment trees, but 2D BIT is simpler to implement. Constraints: matrix up to , up to operations.