Greedy Solution || Java || Time O(NlogN) and Space:O(1)
\n\n public int getMaximumConsecutive(int[] coins) {\n        Arrays.sort(coins);\n        int result=1;\n        \n        int idx=0;\n        while(idx<coins.
\n```\n public int getMaximumConsecutive(int[] coins) {\n        Arrays.sort(coins);\n        int result=1;\n        \n        int idx=0;\n        while(idx<coins.length && result>=coins[idx]){\n            result+=coins[idx];\n            idx++;\n        }\n        return result;\n    }\n\t```
['Greedy', 'Sorting', 'Java']