85. Maximal Rectangle

85. Maximal Rectangle

Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area.

For example, given the following matrix:

1 0 1 0 0
1 0 1 1 1
1 1 1 1 1
1 0 0 1 0

Return 6.

 

posted @ 2016-12-12 11:29  PKICA  阅读(125)  评论(0编辑  收藏  举报