Find the Highest Altitude LeetCode solution in Python

1
# Runtime: 50 ms (Top 25.7%) | Memory: 16.17 MB (Top 90.4%)
2

3

4
class Solution:
5
def largestAltitude(self, gain: List[int]) -> int:
6
return max(accumulate([0] + gain))

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0