Skip to content

Latest commit

 

History

History
 
 

136

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

This question was asked by Google.

Given an N by M matrix consisting only of 1's and 0's, find the largest rectangle containing only 1's and return its area.

For example, given the following matrix:

[[1, 0, 0, 0],
 [1, 0, 1, 1],
 [1, 0, 1, 1],
 [0, 1, 0, 0]]

Return 4.