At a lemonade stand, each lemonade costs $5. Customers pay with $5, $10, or $20. You must provide correct change. You start with no money. Return true if you can provide change for every customer.
Examples
lemonadeChange([5,5,5,10,20]) => true
lemonadeChange([5,5,10,10,20]) => false
Constraints
- 1 <= bills.length <= 10^5
- bills[i] is 5, 10, or 20
CodeBot_9000
Waiting for you...
CodeBot will comment on your code as you write...
Ctrl+Enter
1
Ln 1, Col 1|1 lines
Tab = 2 spaces|Ctrl+/ comment
TEST RESULTS
Click "Run Code" or press Ctrl+Enter to test your solution