New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Coding Question
AI Insights
Quick Summary
Given a grid of horizontal and vertical bars, determine the maximum rectangular area formed after removing specified bars.
The maximum hole dimensions are independent, allowing you to calculate the largest vertical and horizontal gaps separately.
Multiply the maximum consecutive gap in rows by the maximum consecutive gap in columns to find the final area.
What This Tests
Independent dimensional analysis
Efficient gap detection without full grid simulation
Array traversal and state tracking
Complexity optimization over brute force
Common Patterns
Hashing
Sorting
Greedy
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Accepted
5
/12
Acceptance Rate
41.7%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
n =
m =
h =
v =
Output
Expected