Java easy soln ( 0 ms runtime)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(n)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int largestAltitude(int[] gain) {\n        int max=0;\n        int current=0;\n        for(int i=0;i<gain.length;i++){\n            current+=gain[i];\n            max=Math.max(current,max);\n        }\n        return max;\n    \n    }\n}\n```
['Java']