Minimum Change

Start Timer

0:00:00

Upvote
22
Downvote
Save question
Mark as completed
View comments (46)

Write a function find_change to find the minimum number of coins that make up the given amount of change cents. Assume we only have coins of value 1, 5, 10, and 25 cents.

Example:

Input:

cents = 73

Output:

def find_change(cents) -> 7
#(25 + 25 + 10 + 10 + 1 + 1 + 1)
.
.
.
.
.


Comments

Loading comments