![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
矩阵
JohnWill_
小白一个,慢慢成长....
展开
-
Largest Rectangle in Histogram求直方图中最大的矩形
题目描述Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram. Above is a histogram where width of...原创 2018-04-02 17:43:16 · 235 阅读 · 0 评论 -
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. 解析此题是之前那道的 Largest Rectangle in Histogram 直方图中最大的矩形 的扩展,这道题的二维矩阵每一层向上都可以看做一个直...原创 2018-04-02 22:22:37 · 307 阅读 · 0 评论 -
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? 其实题目更好理解为顺时针旋转一个矩阵的下标90°。关键是要把下标计算好,原矩阵的数值应该对应到新的旋转矩...原创 2018-04-10 19:28:22 · 119 阅读 · 0 评论 -
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.Follow up: Did you use extra space? A straight forward solution using O(m n) space is probabl...原创 2018-04-05 16:59:28 · 73 阅读 · 0 评论 -
Edit Distance
概念编辑距离的作用主要是用来比较两个字符串的相似度的基本的定义如下所示:编辑距离,又称Levenshtein距离(莱文斯坦距离也叫做Edit Distance),是指两个字串之间,由一个转成另一个所需的最少编辑操作次数,如果它们的距离越大,说明它们越是不同。许可的编辑操作包括将一个字符替换成另一个字符,插入一个字符,删除一个字符。这个概念是由俄罗斯科学家Vladimir Levenshtein在1...原创 2018-04-07 12:11:56 · 108 阅读 · 0 评论