[leetcode] Range Sum Query 2D – Immutable
Range Sum Query 2D – Immutable Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by (row1, col1), (row2, col2). Example: Given matrix = [ [3, 0, 1, 4, 2], [5, 6, 3, 2, 1], [1, 2, 0, 1, 5], [4, 1, 0, 1, […]