diff --git a/problems/0051.N皇后.md b/problems/0051.N皇后.md index bd1d1c9b..54580cf7 100644 --- a/problems/0051.N皇后.md +++ b/problems/0051.N皇后.md @@ -208,6 +208,9 @@ public: } }; ``` +* 时间复杂度: O(n!) +* 空间复杂度: O(n) + 可以看出,除了验证棋盘合法性的代码,省下来部分就是按照回溯法模板来的。