Easy C++ Solution
\n\n# Code\n\nclass Solution {\npublic:\n    int getMaximumConsecutive(vector<int>& coins) {\n        sort(coins.begin(),coins.end());\n        int count=1;\n  
\n\n# Code\n```\nclass Solution {\npublic:\n    int getMaximumConsecutive(vector<int>& coins) {\n        sort(coins.begin(),coins.end());\n        int count=1;\n        for(int i=0;i<coins.size();i++)\n        {\n            if(coins[i]<=count){\n                count+=coins[i];\n            }\n            else\n            {\n                return count;\n            }\n        }\n        return count;\n    }\n};\n```
['Array', 'Greedy', 'Sorting', 'C++']