bumpsoo 2026-06-19 07:25:28 +00:00
parent 14772aa21f
commit b402cce21a

View file

@ -0,0 +1,12 @@
# https://leetcode.com/problems/find-the-highest-altitude
from typing import List
class Solution:
def largestAltitude(self, gain: List[int]) -> int:
result = 0
current = 0
for altitude in gain:
current += altitude
result = max(current, result)
return result