K, i need to do a Super N Queens problem in which not only can the queens not attack each other but we have to make it so that they can't attack each other even if they could move like knights do. Anyways, I'm trying to analyze a solution of the original N Queens problem that our Prof. posted to us that we can use. Here's a link:
N Queens Sample Solution
What I don't understand is the purpose of the two arrays, d1 and d2, that come after the row array. There's little comments that the author made beside each statement and I can figure out that these arrays have something to do with the diagonals on the chess board but I don't undertstand how they relate to that. Like the array for d1 is index=[2..2*N] and d2 index=[1..2*N-1]. Anyone wanna give it a shot? Also, this fricken program doesn't wanna compile for me as well. I put the (uses: wincrt😉 statement in cause I use a Windows compiler but it stops at the global var statements part. Thanx in advance for any help. Any clues on how to do the Super N Queens problem would be greatly appreciated.
N Queens Sample Solution
What I don't understand is the purpose of the two arrays, d1 and d2, that come after the row array. There's little comments that the author made beside each statement and I can figure out that these arrays have something to do with the diagonals on the chess board but I don't undertstand how they relate to that. Like the array for d1 is index=[2..2*N] and d2 index=[1..2*N-1]. Anyone wanna give it a shot? Also, this fricken program doesn't wanna compile for me as well. I put the (uses: wincrt😉 statement in cause I use a Windows compiler but it stops at the global var statements part. Thanx in advance for any help. Any clues on how to do the Super N Queens problem would be greatly appreciated.