Easy C++ Solution
\nclass Solution {\npublic:\n    int largestAltitude(vector<int>& gain) {\n        int sum = 0 ;\n        vector<int> v;\n        for(int i = 0 ; i<gain.size() 
```\nclass Solution {\npublic:\n    int largestAltitude(vector<int>& gain) {\n        int sum = 0 ;\n        vector<int> v;\n        for(int i = 0 ; i<gain.size() ; i++){\n            sum+=gain[i];\n            v.push_back(sum);\n        }\n        int x = *max_element(v.begin() , v.end());\n        if(x>0)\n            return x;\n        return 0;\n    }\n};\n```
['C']