I am trying to implement N- Queens problem in python. I need a small help in designing the algorithm to check if given a position of Queen check whether any other queen on the board is present on its diagonal or not.
I am trying to design a function diagonal_check(board, row, col)
where board is N*N matrix of arrays where '1' represents presence of queen and '0' represents absence.
I will pass array and position of queen (row,col) to the function. My function must return false if any other queen is present on its diagonal or else return true.
If anyone could help me with algorithm for diagonal_check
function. Not looking for any specific language code.