public void solve1(char[][] board) {
        if(board == null || board.length == 0) return;
        R = board.length;
        C = board[0].length;
        visited = new boolean[R][C];
        for(int i = 0; i < R; ++i){
            for(int j = 0; j < C; ++j){
                if(board[i][j] == 'O'){
                    solveDFS(board, i, j);
                }
            }
        }
        return;
    }