You are given N cents (integer N) and have to break up the N cents into coins of 1 cent, 2 cents, 5 cents. Prove that greedy algorithm ALWAYS gives optimal solution
You are given N cents (integer N) and have to break up the N cents into coins of 1 cent, 2 cents, 5 cents. Prove that greedy algorithm ALWAYS gives optimal solution
Related questions
Question

Transcribed Image Text:You are given N cents (integer N) and have to break up the N cents into coins of 1 cent, 2 cents, 5 cents.
Prove that greedy algorithm ALWAYS gives optimal solution
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps
