mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-09 19:44:45 +08:00
update 0051.N皇后:添加复杂度分析
This commit is contained in:
@ -208,6 +208,9 @@ public:
|
||||
}
|
||||
};
|
||||
```
|
||||
* 时间复杂度: O(n!)
|
||||
* 空间复杂度: O(n)
|
||||
|
||||
|
||||
可以看出,除了验证棋盘合法性的代码,省下来部分就是按照回溯法模板来的。
|
||||
|
||||
|
Reference in New Issue
Block a user