Solving Surrounded Regions in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.

Problem Description

Example:

X X X X
X O O X
X X O X
X O X X

After running your function, the board should be:

X X X X
X X X X
X X X X
X O X X

Explanation:

See the full details of the problem Surrounded Regions at LeetCode

Originally posted at: @github.com/halfrost/LeetCode-Go