Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 267 Bytes

1732.-find-the-highest-altitude.md

File metadata and controls

14 lines (9 loc) · 267 Bytes

1732. Find the Highest Altitude

class Solution:
    def largestAltitude(self, gain: List[int]) -> int:
        
        ans = [0]
        for i in range(len(gain)):
            ans.append(ans[-1] + gain[i])
        
        
        return max(ans)