Leetcode - 17. Letter Combinations of a Phone Number
51. N-Queensr[H]
https://leetcode.com/problems/n-queens/
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.
Example:
1 | Input: 4 |
Solution
1 |
52. N-Queens II[H]
https://leetcode.com/problems/n-queens-ii/
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 the number of distinct solutions to the n-queens puzzle.
Example:
1 | Input: 4 |
Solution
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment





