Capital One interview question

Coin change problem