Brave AI Lab Interview Question

coin change problem from leetcode.