Easy Java O(nlogn) Solution
\nclass Solution {\n    public int getMaximumConsecutive(int[] nums) {\n        int len = nums.length;\n        Arrays.sort(nums);\n        int ans = 1;\n      
```\nclass Solution {\n    public int getMaximumConsecutive(int[] nums) {\n        int len = nums.length;\n        Arrays.sort(nums);\n        int ans = 1;\n        for(int i = 0 ; i < len ; i++) {\n            if(nums[i] > ans) break;\n            ans += nums[i];\n        }\n        return ans;\n    }\n}\n```
['Greedy', 'Sorting', 'Java']