maheshjainckd / Hacktoberfest2022-for-everyone

This repository is for everyone who wants to participate in Hacktoberfest 2022. Anyone can contribute/add quality code or projects for your Swags (T- Shirt), must be relevant that can add some value to this repository.
https://hacktoberfest-2022-react.vercel.app/
MIT License
149 stars 739 forks source link

Create N-Queens #1213

Closed khushibansal26 closed 2 years ago

khushibansal26 commented 2 years ago

The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other.

Given an integer n, return all distinct solutions to the n-queens puzzle. You may return the answer in any order.

Each solution contains a distinct board configuration of the n-queens' placement, where 'Q' and '.' both indicate a queen and an empty space, respectively.