← All problems
Medium · Graphs

Surrounded Regions

Capture enclosed regions while preserving regions connected to the boundary.

Full problem and submission ↗
main.js

Console

Ready