Skip to content

Commit 13831e6

Browse files
authored
Update trapping-rain-water.cpp
1 parent aa81d5b commit 13831e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/trapping-rain-water.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class Solution {
55
public:
66
int trap(vector<int>& height) {
7-
int result = 0, left = 0, right = height.size()-1, level = 0;
7+
int result = 0, left = 0, right = height.size() - 1, level = 0;
88
while (left < right) {
99
int lower = height[height[left] < height[right] ? left++ : right--];
1010
level = max(level, lower);

0 commit comments

Comments
 (0)