Bloomberg Phone Screen
Anonymous User
1303

Given the coins =[1,5,10,25] and target .

Find the minimum coins to make the target,Print the target and its path, ie, the path which has fewer coins.

Target  Expected Output
12-> [1*10,1*2]
68-> [2*25,1*10,1*5,3*2]
132-> [5*25,1*5,2*1]
Comments (5)