Kotlin 1603. Design Parking System
\n\n# Code\n\nclass ParkingSystem(big: Int, medium: Int, small: Int) {\n    var spaces = arrayOf(big, medium, small)\n\n    fun addCar(carType: Int): Boolean {\
\n\n# Code\n```\nclass ParkingSystem(big: Int, medium: Int, small: Int) {\n    var spaces = arrayOf(big, medium, small)\n\n    fun addCar(carType: Int): Boolean {\n        if (spaces[carType - 1] > 0) {\n            spaces[carType - 1] -= 1\n            return true\n        }\n        return false\n        \n    }\n\n}\n\n/**\n * Your ParkingSystem object will be instantiated and called as such:\n * var obj = ParkingSystem(big, medium, small)\n * var param_1 = obj.addCar(carType)\n */\n```
['Kotlin']