Count Non-Attacking Queen Placements
Asked at TikTok · Coding Questions · Difficulty: Hard · Last asked Nov 24, 2026
A chess queen attacks every square in her row, her column and both of her diagonals. Given a square board, count how many different ways there are to place as many queens as the board is wide, so that no queen attacks another.
Loading the problem…