DIY: Maximal rectangle

Problem statement

Given an m x n binary matrix containing 0's and 1's. Find the largest rectangle containing only 1's and return its area.

Input

The input will be an m x n matrix of 0's and 1's. ...

Create a free account to view this lesson.

Continue your learning journey with a 14-day free trial.

By signing up, you agree to Devpath's Terms of Service and Privacy Policy