Problem: https://leetcode.com/problems/surrounded-region
We have to find all regions of O's that are surrounded by X's, and convert them to X's.
The most trivial approach here would be taking every cell that contains an O, and checking to see whether or not it is connected to at least one of the borders through other O cells. If this is the case, that cell is not surrounded. Otherwise that cell is part of a (possibly large) surrounded region and has to marked with X: