Good morning!. Recursive Algorithms Example: Gift box!
33
Good morning!
-
Upload
ada-palmer -
Category
Documents
-
view
226 -
download
0
Transcript of Good morning!. Recursive Algorithms Example: Gift box!
Example: Change for $ 100
• Available denominations: 1c, 5c, 10c, 25c, $1, $2, $5, $10, $20, $50, $100
• How many combinations are there?
Conclusions• Recursion is one of the difficult concepts to
understand, perhaps it is not that intuitive.• As per a few mathematicians & CS folks, it is
one of the most beautiful concepts!• While it is not used much in commercial
applications, it certainly puts your logical thinking skills to work!
• It is easy to remove tail recursion, but all others are lot harder to remove.