At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you, and they pay with either a $5, $10, or $20 bill (represented by the bills array).
You must provide the correct change to each customer so that the net transaction is that each customer pays $5. Note that you don't have any change in hand at first.
Return true if you can provide every customer with the correct change, or false otherwise.
Example 1:
Input: bills = [5,5,5,10,20]
Output: true
Explanation:
Example 2:
Input: bills = [5,5,10,10,20]
Output: false
Explanation:
Example 3:
Input: bills = [5,5,5,5,20,20]
Output: false
Explanation: For the first $20, we give one $10 + one $5 — but we have no $10s, so we give three $5s. For the second $20, we only have one $5 left and cannot make $15 in change.
1 <= bills.length <= 10⁵bills[i] is either 5, 10, or 20