Java Easy Solution  |0ms|  |100% faster|
class Solution {\n    public int largestAltitude(int[] gain) {\n\t\n        int max = 0;\n        int current = 0;\n        for(int i=0; i<gain.length; i++) {\n
class Solution {\n    public int largestAltitude(int[] gain) {\n\t\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}
['Array', 'Java']