We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c91ee8f commit 015935eCopy full SHA for 015935e
problems/0015.三数之和.md
@@ -83,6 +83,10 @@ public:
83
};
84
```
85
86
+* 时间复杂度: O(n^2)
87
+* 空间复杂度: O(n),额外的 set 开销
88
+
89
90
## 双指针
91
92
**其实这道题目使用哈希法并不十分合适**,因为在去重的操作中有很多细节需要注意,在面试中很难直接写出没有bug的代码。
@@ -158,6 +162,10 @@ public:
158
162
159
163
160
164
165
166
+* 空间复杂度: O(1)
167
168
161
169
## 去重逻辑的思考
170
171
### a的去重
0 commit comments