Refactor
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user