矩阵
文章平均质量分 75
jmspan
这个作者很懒,什么都没留下…
展开
-
LeetCode 240. Search a 2D Matrix II (矩阵内搜索)
原题网址:https://leetcode.com/problems/search-a-2d-matrix-ii/ Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in e原创 2016-04-07 00:18:58 · 497 阅读 · 0 评论 -
LeetCode 363. Max Sum of Rectangle No Larger Than K(矩阵和)
原题网址:https://leetcode.com/problems/max-sum-of-sub-matrix-no-larger-than-k/ Given a non-empty 2D matrix matrix and an integer k, find the max sum of a rectangle in the matrix such that its sum is原创 2016-06-23 02:55:19 · 3985 阅读 · 0 评论 -
LeetCode 85. Maximal Rectangle(最大矩形)
原题网址:https://leetcode.com/problems/maximal-rectangle/ Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area. 方法:应用直方图最大矩形面积的方法。 publ原创 2016-05-23 00:34:22 · 1740 阅读 · 0 评论 -
LeetCode 74. Search a 2D Matrix(搜索矩阵)
原题网址:https://leetcode.com/problems/search-a-2d-matrix/ Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each原创 2016-05-22 05:19:08 · 534 阅读 · 0 评论 -
LeetCode 73. Set Matrix Zeroes(矩阵清零)
原题网址:https://leetcode.com/problems/set-matrix-zeroes/ Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. click to show follow up. Follow up: Did原创 2016-05-22 05:18:55 · 684 阅读 · 0 评论 -
LeetCode 59. Spiral Matrix II(螺旋矩阵)
原题网址:https://leetcode.com/problems/spiral-matrix-ii/ Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example, Given n = 3, You should retu原创 2016-05-21 07:50:26 · 394 阅读 · 0 评论 -
LeetCode 48. Rotate Image(旋转)
原题网址:https://leetcode.com/problems/rotate-image/ You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place?原创 2016-05-21 05:34:52 · 383 阅读 · 0 评论 -
LeetCode 221. Maximal Square(最大正方形)
原题网址:https://leetcode.com/problems/maximal-square/ Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given the foll原创 2016-05-06 12:25:55 · 1493 阅读 · 0 评论 -
LeetCode 308. Range Sum Query 2D - Mutable(二维区间求和)
原题网址:https://leetcode.com/problems/range-sum-query-2d-mutable/ Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower原创 2016-04-20 10:31:57 · 1584 阅读 · 0 评论 -
LeetCode 311. Sparse Matrix Multiplication(稀疏矩阵相乘)
原题网址:https://leetcode.com/problems/sparse-matrix-multiplication/ Given two sparse matrices A and B, return the result of AB. You may assume that A's column number is equal to B's row number.原创 2016-04-21 08:12:23 · 2854 阅读 · 0 评论 -
LeetCode 304. Range Sum Query 2D - Immutable(矩阵求和)
原题网址:https://leetcode.com/problems/range-sum-query-2d-immutable/ Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lowe原创 2016-04-19 07:45:22 · 643 阅读 · 0 评论 -
LeetCode 312. Burst Balloons(戳气球)
原题网址:https://leetcode.com/problems/burst-balloons/ Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all t原创 2016-04-21 14:39:10 · 3558 阅读 · 0 评论 -
LeetCode 329. Longest Increasing Path in a Matrix(矩阵内的最长递增路径)
原题网址:https://leetcode.com/problems/longest-increasing-path-in-a-matrix/ Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four dir原创 2016-04-28 01:57:37 · 1609 阅读 · 0 评论 -
422. Valid Word Square
原题网址:https://leetcode.com/problems/valid-word-square/ Given a sequence of words, check whether it forms a valid word square. A sequence of words forms a valid word square if the kth row and co原创 2016-10-27 02:09:40 · 389 阅读 · 0 评论