Medium
Given an m x n board of 'X' and 'O', capture all regions of 'O' that are fully surrounded by 'X' (flip them to 'X'). Any 'O' connected to the border is safe. Return the resulting board.
Input: board = ["XXXX","XOOX","XXOX","XOXX"] Output: ["XXXX","XXXX","XXXX","XOXX"]