LeetCode: Surrounded Regions

Approach 1: Check four boarders. Find ‘O’s on the borders, and start
from the ‘O’s on the borders with BFS. Mark all ‘O’s can be reached
from the borders as ‘Y’. Mark all remaining ‘O’s as ‘X’, mark all ‘Y’s
as ‘O’.