Copy this Gist into a new secret gist of your own, and deliver it NO LATER THAN THE TIME specified during the challenge intro.
Find the combination of items that add up to the price on a receipt
Array
=begin first convert prices to ints
- Plan out your base case(s) of how to exit the recursion exit when money_left = 0
- Each iteration of the recursion should look through the whole menu; this can help to "buy" things more than once menu.each do |item| skip item if price > money_left remove that item from menu money_left = money_left%item_price if money_left%item_price == 0 end
- If you find a solution while looping through the menu, you can start returning from your recursion return find_menu(menu, money_left)
- You'll also need a base case AFTER looping through the menu to indicate that nothing on the menu worked return no solution =end