You are viewing a single comment's thread. Return to all comments →
Even when I printed it out for c =[2,5,3,6] and n = 10 I could not understand this approach. Well done though as it definitely works well!!
[1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0] [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0] [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0] [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0] [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1] [1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1] [1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1] [1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1] [1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1] [1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1] [1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 2] [1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2] [1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2] [1, 0, 1, 1, 1, 2, 1, 1, 1, 1, 2] [1, 0, 1, 1, 1, 2, 2, 1, 1, 1, 2] [1, 0, 1, 1, 1, 2, 2, 2, 1, 1, 2] [1, 0, 1, 1, 1, 2, 2, 2, 3, 1, 2] [1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 2] [1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4] [1, 0, 1, 1, 1, 2, 3, 2, 3, 3, 4] [1, 0, 1, 1, 1, 2, 3, 2, 3, 3, 4] [1, 0, 1, 1, 1, 2, 3, 2, 4, 3, 4] [1, 0, 1, 1, 1, 2, 3, 2, 4, 4, 4] [1, 0, 1, 1, 1, 2, 3, 2, 4, 4, 5] 5
Seems like cookies are disabled on this browser, please enable them to open this website
The Coin Change Problem
You are viewing a single comment's thread. Return to all comments →
Even when I printed it out for c =[2,5,3,6] and n = 10 I could not understand this approach. Well done though as it definitely works well!!