javascript greedy 176ms
\nconst getMaximumConsecutive = (c) => {\n    c.sort((x, y) => x - y);\n    let res = 0;\n    for (const e of c) {\n        if (e <= res + 1) res += e;\n    }\n
```\nconst getMaximumConsecutive = (c) => {\n    c.sort((x, y) => x - y);\n    let res = 0;\n    for (const e of c) {\n        if (e <= res + 1) res += e;\n    }\n    return res + 1;\n};\n```
['Greedy', 'JavaScript']