This function solves the N Queen problem using Branch and Bound . It mainly uses solveNQueensUtil ( ) to solve the problem . It returns false if queens cannot be placed , otherwise return true and prints placement of queens in the form of 1 s . Please note that there may be more than one solutions , this function prints one of the feasible solutions .
bool solveNQueens ( ) { int board [ N ] [ N ] ; memset ( board , 0 , sizeof board ) ;