摘要:
题目:Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.代码:class Solution {publi... 阅读全文
摘要:
题目:Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all dist... 阅读全文
摘要:
题目:Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty spac... 阅读全文