Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Day 384 #776

Closed
vaskoz opened this issue Dec 10, 2019 · 0 comments · Fixed by #777
Closed

Day 384 #776

vaskoz opened this issue Dec 10, 2019 · 0 comments · Fixed by #777
Assignees

Comments

@vaskoz
Copy link
Owner

vaskoz commented Dec 10, 2019

Good morning! Here's your coding interview problem for today.

This problem was asked by WeWork.

You are given an array of integers representing coin denominations and a total amount of money. Write a function to compute the fewest number of coins needed to make up that amount. If it is not possible to make that amount, return null.

For example, given an array of [1,5, 10] and an amount 56, return 7 since we can use 5 dimes, 1 nickel, and 1 penny.

Given an array of [5, 8] and an amount 15, return 3 since we can use 5 5-cent coins.

@vaskoz vaskoz self-assigned this Dec 10, 2019
@vaskoz vaskoz mentioned this issue Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant