We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f07e96e commit 26239f9Copy full SHA for 26239f9
src/algorithms/uncategorized/rain-terraces/README.md
@@ -74,7 +74,7 @@ the sides minus its own height.
74
75
- Initialize `answer = 0`
76
- Iterate the array from left to right:
77
- - Initialize `max_left = 0 and `max_right = 0`
+ - Initialize `max_left = 0` and `max_right = 0`
78
- Iterate from the current element to the beginning of array updating: `max_left = max(max_left, height[j])`
79
- Iterate from the current element to the end of array updating: `max_right = max(max_right, height[j])`
80
- Add `min(max_left, max_right) − height[i]` to `answer`
0 commit comments