1798. Maximum Number of Consecutive Values You Can Make
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def getMaximumConsecutive(self, coins: list[int]) -> int:
        coins.sort()
        ans = 0
        for coin in coins:
            if coin > ans + 1:
                break
            ans += coin
        return ans + 1

```
['Python3']