The #SICP example of counting change (page 51 of the PDF) is kicking my butt, ha. It took me a really long time to understand that "using all n kinds of coins" means "you can choose freely from all the n available types of coins but don't need to use all of them". And now, as a challenge, I'm trying to come up with an iterative process to solve this and I'm really struggling!
No one said that studying computer science at 42yo would be easy 😌
=> More informations about this toot | More toots from gosha@merveilles.town
Oooh it's dynamic programming™
=> More informations about this toot | More toots from gosha@merveilles.town
Had to go learn to use let, iterations, and vectors to come up with that one, but it works.
=> More informations about this toot | More toots from gosha@merveilles.town
@gosha shouldn't the iterative approach still use recursion?
=> More informations about this toot | More toots from fkinoshita@merveilles.town
@fkinoshita I thought so too but couldn't come up with one! How did you go about it?
=> More informations about this toot | More toots from gosha@merveilles.town
@gosha i also couldn't figure out for this exercise, i was hopeful you had another implementation!
=> More informations about this toot | More toots from fkinoshita@merveilles.town This content has been proxied by September (3851b).Proxy Information
text/gemini