Closed prasathk11 closed 3 years ago
Hey @Starkultra could you please add these details (problem, sample I/O, etc.) within the code as comments, like in other programs in the repository?
Hey @SidJain1412 added ques, i/p, and o/p as a comment please check it now
@all-contributors please add @Starkultra for code
@SidJain1412
I've put up a pull request to add @Starkultra! :tada:
Thanks for contributing @Starkultra 😄
Issue : #85 Problem Name: NQueens
Problem Description: The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-queens puzzle. Each solution contains a distinct board configuration of the n-queens' placement, where 'Q' and '.' both indicate a queen and an empty space respectively. There exist two distinct solutions to the 4-queens puzzle as shown above.
INPUT: 4
OUTPUT: [ #Solution1 [".Q..", "...Q", "Q...", "..Q."],
CONSTRAINTS:
Sample input: 4
Sample output: ["..Q.", "Q...", #solution2 "...Q", ".Q.."] ]