You are given N cents (integer N) and have to break up the N cents into coins of 1 cent, 6 cents, 7 cents. Prove that greedy algorithm may not always give optimal solution

icon
Related questions
Question
You are given N cents (integer N) and have to break up the N cents into coins of 1 cent, 6 cents, 7 cents.
Prove that greedy algorithm may not always give optimal solution
Transcribed Image Text:You are given N cents (integer N) and have to break up the N cents into coins of 1 cent, 6 cents, 7 cents. Prove that greedy algorithm may not always give optimal solution
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer