This commit is contained in:
2022-11-30 18:20:36 +08:00
parent b13cfa00bb
commit 72555b19e0
132 changed files with 332 additions and 334 deletions

View File

@@ -9,7 +9,7 @@
// 也就是说只有当移动小的指针时才有可能让储存的水量超过之前的
// 因此每次迭代我们移动较小的指针,然后统计出最大的储存水量
int Solution::maxArea(vector<int>& height) {
int S0011::maxArea(vector<int>& height) {
int max{0};
for (int l{0}, r{static_cast<int>(height.size() - 1)}; r != l;) {
if (height.at(l) > height.at(r)) {