Assume that each coin's value is an integer. Suppose that the available coins are in the
charity bills that are powers of n, i.e., the charity bills are n
0
, n
1
, ...,nk
for [4,15,6,7,9,3,2].
Show that the greedy algorithm always yields an optimal solution but keep the following
terms in mind that
a. Solution should have most two dimes, at most one nickel at most four pennies,
b. Solution cannot have two dimes and a nickel.
c. The amount of change in dimes, nickels, and pennies cannot exceed 54 cents.
Answers
Answered by
0
Answer:
what do you want
Explanation:
Similar questions