Use BFS instead of DFS to flood fill a unsurrounded region, it doesn't run into run time error (stack overflow) but ran into time limit exceed problem this time.