Question discussion

For the coin denominations {1, 3, 4}, what is the minimum number of coins needed to make the amount 6?

2171Medium DSSSB TGT Computer Science 0 replies 1 views
0

For the coin denominations {1, 3, 4}, what is the minimum number of coins needed to make the amount 6?

  • A2
  • B3
  • C4
  • D6
Correct answer: A

Explanation

Two coins of value 3 make 6, whereas the greedy choice 4 + 1 + 1 uses three coins.

Discussion 0

Nobody has replied yet. Start the discussion!