Given a 2D matrix, handle multiple queries asking for the sum of elements inside a rectangle defined by its upper-left corner (row1, col1) and lower-right corner (row2, col2).
With a matrix and query sumRegion(2, 1, 4, 3), you return the sum of all elements in that rectangular region.
The matrix doesn't change between queries. How can you preprocess it so each query runs in constant time?
Constraints: Matrix up to . Up to queries.