85/

directory
v0.0.0-...-9b92ec5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2021 License: MIT

README

最大矩形

给定一个仅包含 01 、大小为 rows x cols 的二维二进制矩阵,找出只包含 1 的最大矩形,并返回其面积。

 

示例 1:

image **输入:**matrix = [["1","0","1","0","0"],["1","0","1","1","1"],["1","1","1","1","1"],["1","0","0","1","0"]] **输出:**6 **解释:**最大矩形如上图所示。

示例 2:

**输入:**matrix = [] **输出:**0

示例 3:

**输入:**matrix = [["0"]] **输出:**0

示例 4:

**输入:**matrix = [["1"]] **输出:**1

示例 5:

**输入:**matrix = [["0","0"]] **输出:**0

 

提示:

  • rows == matrix.length
  • cols == matrix[0].length
  • 0 <= row, cols <= 200
  • matrix[i][j]'0''1'

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL