Easy python solution
\nclass Solution:\n    def largestAltitude(self, gain: List[int]) -> int:\n        ans=[0]\n        for i in range(len(gain)):\n            ans.append(ans[i]+ga
```\nclass Solution:\n    def largestAltitude(self, gain: List[int]) -> int:\n        ans=[0]\n        for i in range(len(gain)):\n            ans.append(ans[i]+gain[i])            \n        return max(ans)\n```\n\n\nplease upvote if you got the concept\ncomment for any help
['Array', 'Python', 'Python3']