public void solve(char[][] board) {
        //X O
		if(board==null|| board.length==0) return;
		init(board);
		//first and last row
		for(int j=0;j<width;j++)
		{
			visitAroundNoTurn(0, j, board);
			visitAroundNoTurn(height-1,j, board);
		}
		 
		
		//first and last column
		for(int i=0;i<height;i++)
		{
			visitAroundNoTurn(i,0,board);
			visitAroundNoTurn(i,width-1,board);
		}
		
		
		for(int i=0;i<height;i++)
			for(int j=0;j<width;j++)
			{
				if( board[i][j]=='O' )
				{
					board[i][j] = 'X';
				}
				else if( board[i][j]=='A' )
				{
					board[i][j] = 'O';
				}
				
			}
		 
		
    }