Change Cash Function Optimization - Javascript
问题 Today I come to your aid in favor of optimizing some code! I was asked to solve a problem on a test a few weeks ago, and came up with this non-optimal solution since I'm beggining to learn Javascript. I wonder if there's a way (of course there is) to make this better. Here's the situation: "I am a particular kind person who has an infinite ammount of $2, $5 and $10 dollar bills, and I'm willing to change cash for anyone who wants it, BUT in the most efficient way, with the minimum ammount of