Add 'kotlin/change/notes.txt'
This commit is contained in:
parent
4ee707c789
commit
75b2f1313b
1 changed files with 21 additions and 0 deletions
21
kotlin/change/notes.txt
Normal file
21
kotlin/change/notes.txt
Normal 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)
|
Loading…
Add table
Reference in a new issue