Bom CSC 382 Analysis of Algorithms 4. (5 points) K Bishops We have previously solved the N Queens Problem, where, for a
Posted: Mon May 09, 2022 7:16 am
Bom CSC 382 Analysis of Algorithms 4. (5 points) K Bishops We have previously solved the N Queens Problem, where, for a given n, we calculated the number of ways to placen queens on an n x n board. This problem concerns bishops on the chessboard. A bishop is a chess piece that controls all the squares on the two diagonals that it can reach. The K Bishops Problem should calculate the number of different ways that k bishops could be placed on an nxn chessboard. Structure your program using the backtracking scheme that we have used for the N Queens. What needs to be modified (mostly) is the OK function Write the bool 1.OK...) function for K Bishops problem.