C++ | Sort | Similar to Patching Array
```\nclass Solution {\npublic:\n    int getMaximumConsecutive(vector& coins) {\n        int mis = 1, i =0;\n        sort(coins.begin(),coins.end());\n        wh
```\nclass Solution {\npublic:\n    int getMaximumConsecutive(vector<int>& coins) {\n        int mis = 1, i =0;\n        sort(coins.begin(),coins.end());\n        while(i<coins.size() && mis>=coins[i])\n            mis += coins[i++];\n        return mis;\n    }\n};
[]