Darwinbox interview question

Coin change problem on leetcode.