← ALL NOTES
Array

130. Surrounded Regions

Deciding whether a region of 'O' is surrounded means proving that none of its cells escapes to the border — an awkward property to check region by region. So flip it: instead of hunting for the…

Loading…