130. Surrounded Regions
Description: Given an m x n matrix board containing 'X' and 'O', capture all regions that are 4-directionally surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in that surrounded region. ''' [1] dfs) idea:: while moving on the border, if meet 'O', then make all connected 'O' as '#'. after then, remaining 'O' should be flipped (surrounded, so it is not connected border-'O') a..
2021.11.04