Help please!
AlcidesCunha (1)

I found this solution for the problem of "eight queens" in C, but i cant understand this code and it backtracking. Anyone can help me/

You are viewing a single comment. View All
heyitsmarcus (287)

@CPPStudent7308 The Eight Queens puzzle is to list all of the solutions where you have an 8 x 8 board with only 8 Queens on it such that no Queen can intercept another queen from their current position. The Queens all have the same "power" that they have in Chess, where the queen can move diagonally, vertically, or horizontally as much as they wish. This means that every solution to the problem must have a Queen in spots where if they were to move from the current position they're in, they could not capture another queen.

This Wikipedia article has more information about the problem itself: https://en.wikipedia.org/wiki/Eight_queens_puzzle