Add 'kotlin/change/notes.txt'

This commit is contained in:
Anthony Cicchetti 2019-05-06 19:31:55 +00:00
parent 4ee707c789
commit 75b2f1313b

21
kotlin/change/notes.txt Normal file
View file

@ -0,0 +1,21 @@
Anthony Cicchetti
,
3 mins
,
Edited,
build up a group of "smallest required for x cost"
in this case, your map would look like
please hold
Anthony Cicchetti
,
Now
,
Edited,
cost | coins
1 | 1
2 | 1 + cost(1)
3 | 1 + cost(2) OR 3 (we pick 3)
4 | 1 + cost(3) OR 4 (we pick 4)
5 | 1 + cost(4) OR 3 + cost(2) OR 4 + cost(1) (we pick the last or the first)
6 | 1 + cost(5) OR 3 + cost(3) OR 4 + cost(2) (we pick 3 + cost(3), because that's fewer coins than the other options)