You are given two integers, n and m, representing a grid that contains
You are also given two integer arrays, hBars and vBars.
The array hBars contains the indices of horizontal bars that can be removed.
The array vBars contains the indices of vertical bars that can be removed.
A hole is a contiguous empty region formed by removing some bars. Return the maximum area of a square hole that can be created by removing any combination of the available bars.
Constraints:
n
m
hBars.length
hBars[i] n
vBars.length
vBars[i] m
All values in hBars are distinct.
All values in vBars are distinct.
You are given two integers, n and m, representing a grid that contains
You are also given two integer arrays, hBars and vBars.
The array hBars contains the indices of horizontal bars that can be removed.
The array vBars contains the indices of vertical bars that can be removed.
A hole is a contiguous empty region formed by removing some bars. Return the maximum area of a square hole that can be created by removing any combination of the available bars.
Constraints:
n
m
hBars.length
hBars[i] n
vBars.length
vBars[i] m
All values in hBars are distinct.
All values in vBars are distinct.