LeetCode 52 N-Queens II 题解
1.题目:
Follow up for N-Queens problem.
Now, instead outputting board configurations, return the total number of distinct solutions.
题意:
N-Queens问题,输出总数。
2.解题思路:
与51题一样【捂脸】。
3.代码
1 |
|
很高兴遇见你~
Follow up for N-Queens problem.
Now, instead outputting board configurations, return the total number of distinct solutions.
题意:
N-Queens问题,输出总数。
与51题一样【捂脸】。
1 |
|