All challenges
Multiple ChoiceIntermediate 30s

Greedy: Coin Change

The greedy coin change algorithm (always pick largest coin):
Options
  1. 1Is exactly equivalent to the dynamic programming solution in all cases here
  2. 2Works for canonical coin systems (like US coins) but may fail for arbitrary denominations
  3. 3Always returns the optimal solution for any arbitrary currency system given
  4. 4Cannot be applied to any coin sets having integer denominations at all now

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle