# How to devise this solution to Non-Constructible Change challenge from Algoexpert.io

I'm working through algoexpert.io coding challenges and I'm having trouble undersatnding the suggested solution to one of the questions titled **Non-Constructible Change**

Here's the challenge question:

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
minimum 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 minimum amount of change that you can't create is 1.

```
// O(nlogn) time, O(n) size.
function nonConstructibleChange(coins) {
coins = coins.sort((a, b) => a - b); // O(nlogn) time operation
let change = 0;
for (coin of coins) {
if (coin > change + 1) return change + 1;
change += coin;
}
return change + 1;
}
```

My problem

I am not completely sure how did the author of the solution come up with the intuition that

```
if the current coin is greater than `change + 1`, the smallest impossible change is equal to `change + 1`.
```

I can see how it tracks, and indeed the algorithm passes all tests, but I'd like to know more about a process I could use to devise this rule.

Thank you for taking the time to read the question!