Find the largest rectangle in a matrix

easy
You are given a matrix of '0' and '1'
 You have to return the area of the largest rectangle formed by '1's in the mat

Input Format

A 2D matrix of '1' and '0'

Output Format

An integer(largest area)

Constraints

0<=rows<10^4
 0<=col<10^4

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
2 8
0
0
1
0
0
0
0
0
1
1
1
1
1
1
1
0
Output
7
Previous
Decimal Number From Binary Linked List
Next
Count Pairs Having Sum X

Related Questions