Summing
Intuition\n Describe your first thoughts on how to solve this problem. \nAt first we need to sort the $coins$ array.\nIf we can construct all sums in the range 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nAt first we need to sort the $coins$ array.\nIf we can construct all sums in the range $[1, k]$ inclusive, and we have the next number from $coins[i]$, then using this number we can construct all sums in the range $[1, k + coins[i]]$\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nSumming\n\n# Complexity\n- Time complexity: $O(n \\cdot logn)$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $O(n)$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nwhere $n$ is the length of the $coins$ array\n\n# Code\n```\nimpl Solution {\n    pub fn get_maximum_consecutive(mut coins: Vec<i32>) -> i32 {\n        coins.sort_unstable();\n        \n        let mut s = 0;\n\n        for c in coins {\n            if s < c - 1 {\n                break;\n            }\n            s += c;\n        }\n\n        s + 1\n    }\n}\n```
['Prefix Sum', 'Rust']