In this post, we are going to discuss leetcode 1074 — Number of Submatrices That Sum to Target, which is asked in Google interviews. Problem Analysis Given a matrix and a target, return the number of non-empty submatrices that sum to target. A submatrix x1, y1, x2, y2 is the set of…