Python Solution using Queue
\'\'\'\n\n    def lemonadeChange(self, bills):\n    \n        q = collections.deque()\n        for bill in bills:\n            if bill == 5:\n                q.
\'\'\'\n\n    def lemonadeChange(self, bills):\n    \n        q = collections.deque()\n        for bill in bills:\n            if bill == 5:\n                q.appendleft(bill)\n            if bill == 10:\n                if not q: return False\n                if q[0] == 5:\n                    q.popleft()\n                    q.append(bill)\n                else:\n                    return False\n            if bill == 20:\n                if not q: return False\n                while bill > 10:\n                    if not q: return False\n                    bill -= q.pop()\n                if not q: return False\n                if bill > 5:\n                    bill -= q.popleft()\n                if bill != 5: return False\n        return True\n\t\t\n\'\'\'\nExplanation: Append 5 to the left, append 10 to the right. Chose where to pop. We don\'t have to append 20. Just for fun. : )
[]