Given a 2D binary matrix filled with 0’s and 1’s, find the largest square containing only 1’s and return its area.
Example:
1 | Input: |
解法1:单调栈
解法详见程序员代码面试指南:求最大子矩阵的大小
1 | class Solution { |
Given a 2D binary matrix filled with 0’s and 1’s, find the largest square containing only 1’s and return its area.
Example:
1 | Input: |
解法详见程序员代码面试指南:求最大子矩阵的大小
1 | class Solution { |