public void solve(char[][] board) {
        if (board == null || board.length == 0) {
            return;
        }
        int rowSize = board.length;
        int colSize = board[0].length;
        boolean[][] visited = new boolean[rowSize][colSize];
        ArrayList<Character> current = new ArrayList<Character>();
        for (int i = 0; i < rowSize; i++) {
            for (int j = 0; j < colSize; j++) {
                if (visited[i][j] == false && board[i][j] == 'O') {
                    visited[i][j] = true;
                    boolean result = find(board, visited, i, j);
                    if (result == true) {
                        board[i][j] = 'X';
                    }
                }
            }
        }

    }