Maximal Rectangle

Maximal Rectangle

Given an m x n binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. Constraints: rows == matrix.length cols == matrix[i].length 1 <= rows, cols <= 200 matrix[i][j] is '0' or '1'.
JavaMonotonic StackDP
00
Read
1
InterviewGPT

AI-powered tools to help you succeed in tech interviews — from resume to offer.

Products

  • Interview Solver
  • Question Bank
  • Golden Blogs
  • Intervipedia
  • Application Tools

Company

  • Pricing
  • FAQ
  • About

Legal

  • Privacy Policy
  • Terms of Service

© 2026 InterviewGPT Inc. All rights reserved.

All systems operationalUS-East

Made with ♥ for developers