Prison Break

Prison Break is an Ixl interviews coding interview problem. Given a prison gate made of horizontal and vertical bars spaced 1 unit apart, and lists of bars removed, determine the area of the largest hole formed. This interview question provides n, m, and arrays of removed horizontal (h) and vertical (v) bars, and asks for the maximum hole area as the result.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: