Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8e11b11

Browse files
committedSep 26, 2021
Add solution #42
1 parent e7370b0 commit 8e11b11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎solutions/0042-trapping-rain-water.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var trap = function(height) {
2323
leftMax[i] = Math.max(height[i], leftMax[i - 1]);
2424
}
2525

26-
for (let i = height.length - 2; i > -1; i--){
26+
for (let i = height.length - 2; i > -1; i--) {
2727
rightMax[i] = Math.max(height[i], rightMax[i + 1]);
2828
}
2929

0 commit comments

Comments
 (0)
Please sign in to comment.