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 0d5a2ef commit 7db5226Copy full SHA for 7db5226
problems/11.container-with-most-water.md
@@ -116,8 +116,6 @@ JavaScript Code:
116
var maxArea = function(height) {
117
if (!height || height.length <= 1) return 0;
118
119
- // 双指针来进行优化
120
- // 时间复杂度是O(n)
121
let leftPos = 0;
122
let rightPos = height.length - 1;
123
let max = 0;
@@ -154,3 +152,12 @@ public:
154
152
}
155
153
};
156
```
+
+***复杂度分析***
157
+- 时间复杂度:$O(N)$
158
+- 空间复杂度:$O(1)$
159
160
161
+大家也可以关注我的公众号《脑洞前端》获取更多更新鲜的LeetCode题解
162
163
+
0 commit comments