Open fockspaces opened 1 year ago
class Solution: def largestAltitude(self, gain: List[int]) -> int: highest = cur_height = 0 for g in gain: cur_height += g highest = max(highest, cur_height) return highest