We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8d585b commit 266c14bCopy full SHA for 266c14b
problems/96.unique-binary-search-trees.md
@@ -87,7 +87,14 @@ class Solution:
87
self.visited[n] = res
88
return res
89
```
90
+**复杂度分析**
91
+- 时间复杂度:一层循环是 N,另外递归深度是 N,因此总的时间复杂度是 $O(N^2)$
92
+- 空间复杂度:递归的栈深度和visited 的大小都是 N,因此总的空间复杂度为 $O(N)$
93
94
## 相关题目
95
-- [95.unique-binary-search-trees-ii](./95.unique-binary-search-trees-ii.md)
96
+- [95.unique-binary-search-trees-ii](https://github.com/azl397985856/leetcode/blob/master/problems/95.unique-binary-search-trees-ii.md)
97
+
98
+更多题解可以访问我的LeetCode题解仓库:https://github.com/azl397985856/leetcode 。 目前已经30K star啦。
99
100
+关注公众号力扣加加,努力用清晰直白的语言还原解题思路,并且有大量图解,手把手教你识别套路,高效刷题。
0 commit comments