Darwinbox Interview Question

Coin change problem on leetcode.