Day 6 - N Queens Puzzle

April 30-Day Coding Challenge

April 30d Coding Challenge > N Queens Puzzle

Day 6 - N Queens Puzzle

Given a NxN chessboard, place N queens on it such that no two queens can attach each other.

Write a program to print all possible configurations.

The example image shows one solution for n=8. Note most inefficient algorithms work okay for upto 4 queens

To Discuss more and follow up, join us at SDE Skills Discord Server, use the #women-in-tech channel.

How to submit your code

  1. Head over to repl.it
  2. create an account / log in.
  3. Code your submission and share it with user @sdeskills
  4. e-mail your submission to [email protected]

Note: While there is no submission deadline per-se, we recommend you answer these questions as soon as they are posted.

Day 6 - N Queens Puzzle

Want the questions emailed?