Created
July 8, 2022 19:48
-
-
Save felipekm/ef7b49c80686f03e306d210f2b4b3d54 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). | |
Examples: | |
``` | |
> {"coins": [5, 7, 1, 1, 2, 3, 22]} -> 20 | |
> {"coins": [1, 1, 1, 1, 1]} -> 6 | |
> {"coins": [1, 5, 1, 1, 1, 10, 15, 20, 100]} -> 55 | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment