#130

Surrounded Regions

medium· Graphsruns: 0

Given an m x n matrix board containing 'X' and 'O', capture all regions of 'O' that are 4-directionally surrounded by 'X'. A region is captured by flipping all 'O' in it to 'X'. Regions connected to the border are not captured.

sign in to paste and practice your own solution
desktop only

codedrill is a typing game and needs a real keyboard. open this on a laptop or desktop to practice.

you can still browse problems and sections from your phone.