This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.
In this situation the Greedy approach will fail to provide the optimal solution for all cases. For instance, we can assume we must give change to 50 pence by using the fewest number of coins.
The Greedy approach will select the following solution as being optimal: 30 + 12+ 6+1+1 =50 by using 5 coins.
This is only a preview of the solution. Please use the purchase button to see the entire solution