Warner Bros. Discovery interview question

Interviewer asked on Coin change problem with infinite coins. It's a Dynamic programming problem