Super Easy Java Code || Beats 100%
Complexity\n- Time complexity:\nO(n)\n- Space complexity:\nO(1)\n# Code\n\nclass Solution {\n    public boolean lemonadeChange(int[] bills) {\n        int five 
# Complexity\n- Time complexity:\nO(n)\n- Space complexity:\nO(1)\n# Code\n```\nclass Solution {\n    public boolean lemonadeChange(int[] bills) {\n        int five = 0;\n        int ten = 0;\n\n        for(int bill : bills){\n            if(bill == 5){\n                five++;\n            }else if(bill == 10){\n                ten++;\n                five--;\n            }else if(ten > 0) {\n                ten--;\n                five--;\n            }else {\n                five -= 3;\n            }\n\n            if(five < 0) return false;\n        }\n        return true;\n    }\n}\n```
['Java']