Giving change | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 3

Giving change

if you have coins [1,2] and you need to guve money=3 you can do it in two different ways :1+1+1 or 1+2 Given a list of coins=[x1,x2...,xn] and a number money=X program a function returning the number of different ways to give change on X using coins Test : 10 [5,3,2] : 4 11[5,7] : 0

15th Dec 2017, 6:48 AM
VcC
VcC - avatar
2 Antworten
15th Dec 2017, 1:16 PM
LukArToDo
LukArToDo - avatar
15th Dec 2017, 6:10 PM
VcC
VcC - avatar