Halloween Sale
Unlock all premium questions for over 30% off
Maximize Opening in Prison Gate
Medium
Question
A prisoner is plotting an escape. The prison gate is made of n horizontal bars and m vertical bars, spaced exactly one unit apart, so they form a grid in which every opening starts out as a 1 x 1 square. The grid sits inside a fixed outer frame, one unit beyond the first and last bar in each direction, and the frame cannot be removed. By taking out some of the bars, the prisoner can merge openings into bigger ones.
...
Asked at:Expedia
More Expedia interview questions
- Kth Greatest in Expanding Prefixeasy
- Range Negation Data Updateseasy
- Longest Common Subsequence-Substring Lengthmedium
- Minimum Moves to Reorder Layerseasy
- Card Packets with Even Distributionmedium
- Rank Songs by Listener Popularitymedium
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.