We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31aea49 commit a5cece2Copy full SHA for a5cece2
solutions/solution_1732/__init__.py
@@ -3,4 +3,7 @@
3
4
class Solution:
5
def largestAltitude(self, gain: List[int]) -> int:
6
- ...
+ gain = [0] + gain
7
+ for i in range(1, len(gain)):
8
+ gain[i] += gain[i - 1]
9
+ return max(gain)
0 commit comments