Exercises/#145 Maximal Rectangle
#145

Maximal Rectangle

HardπŸ“š Stack & Queue
150 XP

Problem

Given a binary matrix filled with '0's and '1's, find the largest rectangle containing only '1's.

Examples

Input: matrix=[['1','0','1','0','0'],['1','0','1','1','1'],['1','1','1','1','1'],['1','0','0','1','0']]
Output: 6
stackmatrixdynamic-programming
AI Assistantβ€” powered by AI

Unlock hints progressively β€” start gentle, go deeper only if needed.

πŸ’‘

Level 1: Gentle Nudge

A subtle direction

πŸ—ΊοΈ

Level 2: Approach

The algorithm to use

πŸ”

Level 3: Detailed

Step-by-step guidance

145 / 150

Your Solution

⚑ JavaScript

to save progress and use AI features