Algorithms, Dynamic Programming, Data Structures, Computer Science, Leetcode.
needed for this: 15 = 1× 11 + 4 × 1 If we have the foresight to use 1 bills with a face value of 5, the value of target will decrease to 10. Although it is not as small as 4, we only need 2 bills with a face value of 5, because 10 = 2 × 5 . Finally, only 3 bills are needed for this: 15 = 1× 5+ 2 ×