solulubeta
Sign in
NeetCode 150 / Graphs
11.05 · Problem

Surrounded Regions

Medium Flood fill from the border, then flip 1 video LC 130 Pro

This problem is part of solulu Pro

Given a board of 'X' and 'O', capture every region of 'O' that is completely surrounded by 'X' by flipping it to 'X'. A region that touches the border is not surrounded and stays. Modify the board in place.

Lifetime ₹1,999 ₹999 · Launch offer
Mark this problem as solved when you are finished.

Item 84 of 150 · updated 2026-10-12