Beats 100%✅|| Easy Python Code
\n\n---\n\n\n\n# Code\npython []\nclass Solution(object):\n    def largestAltitude(self, gain):\n        """\n        :type gain: List[int]\n        :rtype: int
![Upvote 2.jpg](https://assets.leetcode.com/users/images/7184128d-15b4-4a6d-aae4-aa6f369fa47e_1729618873.7706337.jpeg)\n\n---\n\n\n\n# Code\n```python []\nclass Solution(object):\n    def largestAltitude(self, gain):\n        """\n        :type gain: List[int]\n        :rtype: int\n        """\n        altitude = 0\n        max_altitude = 0\n        for g in gain:\n            altitude += g\n            max_altitude = max(max_altitude,altitude)\n\n        return max_altitude\n        \n```
['Python']