Question DSA-GRDY-0022
EasyUsing coins of ₹1, ₹2, ₹5 and ₹10, how many coins does the greedy method use to pay ₹38?
- A.
6
- B.
5
- C.
Show answer and explanation
Answer: A
10 + 10 + 10 + 5 + 2 + 1 = 38: six coins.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Greedy question
Using coins of ₹1, ₹2, ₹5 and ₹10, how many coins does the greedy method use to pay ₹38?
6
5
Answer: A
10 + 10 + 10 + 5 + 2 + 1 = 38: six coins.
4
7