Algorithms(N Queens)

JEHYUN KIM
1 min readDec 14, 2020

Today we started on solving the N Queens using Js.

One of the Answers

The N Queens puzzle is a problem of placing eight chess queens on an n×n chessboard. And the rules are simple: No two queens share the same row, column, or diagonal.
The interesting part of today was that we tried solving it with a group of 4 people. We managed to finish some of it and will do the rest tomorrow.
We started solving the N Rooks puzzle first. The only difference between the two puzzles is about considering the diagonal part. Which makes the N Rooks a whole lot easier.

The diagonal part was a bit tricky. We had to solve two types of diagonal problem. A diagonal line that looks like /(slash) and the other that looks like \(backslash).
Our team struggled for a while in solving this problem. However, we managed to understand it and the best part was that we could share our codes and learn different ways to solve the problem.
Like this, I hope we will be able to finish it on time tomorrow.

--

--