✅ [Solution] Swift: Lemonade Change
swift\nclass Solution {\n    func lemonadeChange(_ bills: [Int]) -> Bool {\n        var five = 0, ten = 0\n        for b in bills {\n            switch b {\n   
```swift\nclass Solution {\n    func lemonadeChange(_ bills: [Int]) -> Bool {\n        var five = 0, ten = 0\n        for b in bills {\n            switch b {\n            case 5:\n                five += 1\n            case 10:\n                ten += 1\n                if five < 1 { return false }\n                five -= 1\n            case 20:\n                if five < 1 || ten < 1, five < 3 { return false }\n                if ten >= 1 { ten -= 1; five -= 1 } else { five -= 3 }\n            default: break\n            }\n        }\n        return true\n    }\n}\n```\n\n<hr>\n\n<details>\n<summary><img src="https://git.io/JDblm" height="24"> <b>TEST CASES</b></summary>\n\n<pre>\nResult: Executed 2 tests, with 0 failures (0 unexpected) in 0.008 (0.010) seconds\n</pre>\n\n```swift\nimport XCTest\n\nclass Tests: XCTestCase {\n    \n    private let solution = Solution()\n    \n    /*\n     From the first 3 customers, we collect three $5 bills in order.\n     From the fourth customer, we collect a $10 bill and give back a $5.\n     From the fifth customer, we give a $10 bill and a $5 bill.\n     Since all customers got correct change, we output true.\n     */\n    func test0() {\n        let value = solution.lemonadeChange([5,5,5,10,20])\n        XCTAssertEqual(value, true)\n    }\n    \n    /*\n     From the first two customers in order, we collect two $5 bills.\n     For the next two customers in order, we collect a $10 bill and give back a $5 bill.\n     For the last customer, we can not give the change of $15 back because we only have two $10 bills.\n     Since not every customer received the correct change, the answer is false.\n     */\n    func test1() {\n        let value = solution.lemonadeChange([5,5,10,10,20])\n        XCTAssertEqual(value, false)\n    }\n}\n\nTests.defaultTestSuite.run()\n```\n\n</details>
['Swift']