Skip to content

Commit a5cece2

Browse files
committed
solution: 1732. Find the Highest Altitude
1 parent 31aea49 commit a5cece2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

solutions/solution_1732/__init__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33

44
class Solution:
55
def largestAltitude(self, gain: List[int]) -> int:
6-
...
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

Comments
 (0)