# #5 No-Constructible Change
###### tags: `Array` `Easy`
## Problem
Given an array of positive integers representing the values of coins in your possession, write a function that returns the minimum amount of change (the mininum sum of money) that you **cannot** create. The given coins can have any positive integer value and aren't necessarily unique (i.e., you can have multiple coins of the same value).
For example, if you're given `coins = [1, 2, 5]`, the minimum amount of change that you can't create is `4`. If you're given no coins, the minimun amount of change that you can't create is `1`.
### Sample Input
```javascript
coins = [5, 7, 1, 1, 2, 3, 22]
```
### Sample Output
```javascript
20
```
<br>
:::spoiler **Optimal Space & Time Complexity**
```
O(nlogn) time | O(1) space - where n is the number of coins
```
:::
<hr/>
## Solutions
### Official
```javascript=
function nonConstructibleChange(coins) {
// Write your code here.
return 1;
}
```
<br>
---
### Everyone's
:::spoiler 月
```javascript=
```
:::
<br>
:::spoiler Raiy
```javascript=
```
:::
<br>
:::spoiler Becky
```javascript=
```
:::
<br>
:::spoiler 東
```javascript=
```
:::
<br>
:::spoiler Hao
```javascript=
```
:::
<br>
:::spoiler YC
```javascript=
```
:::
<br>
:::spoiler SOL
```javascript=
```
:::
---
## Supplement / Discussion