Google Interview Question

Classic coin change DP problem