Solution: Lemonade Change

Let’s solve the Lemonade Change problem using the Greedy Techniques pattern.

Statement

There is a lemonade stand where customers can buy one lemonade at a time for $5\$5 and pay with a $5\$5, $10\$10, or $20\$20 bill. It is necessary to return the correct change to each customer so that the net transaction is completed successfully with a total payment of $5\$5. Note that no change is available initially.

Given an integer array, bills, where bills[i] represents the bill paid by the ithi^{th} ...