NeetCode #170LC-1074HardArrays & Hashing
← Back to All Problems

#170 · #1074 · Number of Submatrices That Sum to Target(元素和为目标值的子矩阵数量)

📌 Problem Statement & Constraints

Given a matrix and a target, return the number of non-empty submatrices whose sum equals target. Constraints: 1 <= m, n <= 100, -1000 <= matrix[i][j] <= 1000, -10^8 <= target <= 10^8.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!