TIME O(nlogn) || SPACE O(1) || C++ || SIMPLE
\nclass Solution {\npublic:\n    int getMaximumConsecutive(vector<int>& coins) {\n        sort(coins.begin(),coins.end());\n        int ans = 0;\n        int su
```\nclass Solution {\npublic:\n    int getMaximumConsecutive(vector<int>& coins) {\n        sort(coins.begin(),coins.end());\n        int ans = 0;\n        int sum = 0;\n        for(auto &i: coins){\n            if(sum+1<i){\n                return sum+1;\n            }\n            sum += i;\n        }\n        return sum+1;\n    }\n};\n```
['Greedy', 'C', 'Sorting', 'C++']