Python Elegant & Short | Hash Table
Complexity\n- Time complexity: O(1)\n- Space complexity: O(1)\n\n# Code\n\nclass ParkingSystem:\n\n    def __init__(self, big: int, medium: int, small: int):\n 
# Complexity\n- Time complexity: $$O(1)$$\n- Space complexity: $$O(1)$$\n\n# Code\n```\nclass ParkingSystem:\n\n    def __init__(self, big: int, medium: int, small: int):\n        self.__slots = {\n            1: big,\n            2: medium,\n            3: small\n        }\n\n    def addCar(self, car_type: int) -> bool:\n        if not self.__slots.get(car_type):\n            return False\n\n        self.__slots[car_type] -= 1\n        return True\n```
['Hash Table', 'Python', 'Python3']