摘要:
https://leetcode.com/problems/maximal-rectangle/ 思路一:这道题和前面那道 84. Largest Rectangle in Histogram 类似,遍历二维数组,生成一个 heights 数组,然后用 Largest Rectangle in Hi 阅读全文
摘要:
https://leetcode.com/problems/range-addition-ii 思路1: brute force - O(m * n * k), k = number of ops思路2: 从 ops 中找到被操作次数最多的 row 和 column,这可以通过遍历 ops 数组,分 阅读全文