![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
滑动窗口
景行cmy
这个作者很懒,什么都没留下…
展开
-
leetcode 1074. Number of Submatrices That Sum to Target
Given amatrix, and atarget, return the number of non-empty submatrices that sum totarget.A submatrixx1, y1, x2, y2is the set of all cellsmatrix[x][y]withx1 <= x <= x2andy1 <= y &l...原创 2019-11-05 17:35:00 · 193 阅读 · 0 评论 -
leetcode 1074. 元素和为目标值的子矩阵数量
给出矩阵 matrix 和目标值 target,返回元素总和等于目标值的非空子矩阵的数量。子矩阵 x1, y1, x2, y2 是满足 x1 <= x <= x2 且 y1 <= y <= y2 的所有单元 matrix[x][y] 的集合。如果 (x1, y1, x2, y2) 和 (x1', y1', x2', y2') 两个子矩阵中部分坐标不同(如:x1 !=...原创 2019-09-07 10:04:05 · 432 阅读 · 0 评论 -
leetcode 159. Longest Substring with At Most Two Distinct Characters
Given a string s , find the length of the longest substringtthat contains at most 2 distinct characters.Example 1:Input: "eceba"Output: 3Explanation: t is "ece" which its length is 3.Exam...原创 2019-09-30 09:10:28 · 97 阅读 · 0 评论 -
leetcode 340. Longest Substring with At Most K Distinct Characters
Given a string, find the length of the longest substring T that contains at most k distinct characters.Example 1:Input: s = "eceba", k = 2Output: 3Explanation: T is "ece" which its length is 3....原创 2019-10-03 16:09:57 · 101 阅读 · 0 评论