⭐️  [ Javascript / Python3 / C++ ] 🚗  🚕  🚙   Concise solutions
Synopsis:\n\nTrack the count of spaces available for each type of car a, b, c.  When attempting to add a car of type x, return false if space is not available, 
**Synopsis:**\n\nTrack the count of spaces available for each type of car `a`, `b`, `c`.  When attempting to add a car of type `x`, return `false` if space is *not* available, otherwise decrement the space for `x` and return `true`.\n    \n**Note:** since car type values are `1..3` inclusive, we can store the count of spaces available for each type of car with an array `A` using the `0`<sup>th</sup> index as a sentinel value for 1-based indexing.\n\n---\n\n**Bi-Weekly Contest 36 Screenshare:**\n\n![image](https://assets.leetcode.com/users/images/d416d904-8c10-43fc-be0c-a48dae4ee7ef_1601741197.7851267.png)\n\nhttps://www.youtube.com/watch?v=ZQLq_cDJ0CY\n\n---\n\n\n*Javascript*\n```\nclass ParkingSystem {\n    constructor(a, b, c) {\n        this.A = [0, a, b, c];\n    }\n    addCar(x) {\n        if (!this.A[x])\n            return false;\n        --this.A[x];\n        return true;\n    }\n}\n```\n\n*Python3*\n```\nclass ParkingSystem:\n    def __init__(self, a: int, b: int, c: int):\n        self.A = [0, a, b, c]\n    def addCar(self, x: int) -> bool:\n        if not self.A[x]:\n            return False\n        self.A[x] -= 1\n        return True\n```\n\n*C++*\n```\nclass ParkingSystem {\n    using VI = vector<int>;\n    VI A;\npublic:\n    ParkingSystem(int a, int b, int c) : A{ 0, a, b, c } {}\n    bool addCar(int x) {\n        if (!A[x])\n            return false;\n        --A[x];\n        return true;\n    }\n};\n```
[]