Write a program to calculate how many ways can we make change for N cents if we have an endless supply of each of the C = C1, C2,..Cm valued coins? It makes no difference what order the coins are placed in.
Write a program to calculate how many ways can we make change for N cents if we have an endless supply of each of the C = C1, C2,..Cm valued coins? It makes no difference what order the coins are placed in.
题目类型: 技术面试题
这是一道技术面试题,常见于澳洲IT公司面试中。
难度: easy
标签: interviewbit, ibm, company-specific
目标公司: IBM
参考答案摘要
Example: Input : N = 4, C = { 1, 2, 3} Output : 4 Explanation: There are 4 possible combinations : {1, 1, 1, 1}, {1, 1, 2}, {1, 3}, {2, 2} Input : N = 10, C = {2, 3, 5, 6} Output : 5 Explanation: Ther...
本题提供 STAR 原则详细解答和技术解析,登录匠人学院学习中心即可查看完整答案。