Suppose we wanted to make change for purchases and wanted to use the least number of coins possible. Here is a greedy algorithm:
for the change amount due, we always use the largest-face-value coin first. Assume we have only coins of quarters ($.25), twenties ($.20), and pennies ($.01). Assume the change is $.40: a. what would be the coins and their numbers obtained by the greedy algorithm above
The following code is a Python function that takes in the amount of change. Then it uses division and the modulo operator to calculate the number of coins that make up the changes, using the greatest coin values first.
A standard is something that is always at a certain time of the day and is scheduled the same. A protocol takes priority of anything and everything else you work on.