> For the complete documentation index, see [llms.txt](https://algorithm.national-cat.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://algorithm.national-cat.me/leetcode/1603.-design-parking-system.md).

# 1603. Design Parking System

```php
class ParkingSystem {

    private array $parks = [];

    /**
     * @param Integer $big
     * @param Integer $medium
     * @param Integer $small
     */
    function __construct($big, $medium, $small) {
        $this->parks = [
            1 => $big,
            2 => $medium,
            3 => $small
        ];
    }
  
    /**
     * @param Integer $carType
     * @return Boolean
     */
    function addCar($carType) {
        if($this->parks[$carType] === 0){
            return false;
        }

        $this->parks[$carType]--;
        return true;
    }
}

/**
 * Your ParkingSystem object will be instantiated and called as such:
 * $obj = ParkingSystem($big, $medium, $small);
 * $ret_1 = $obj->addCar($carType);
 */
```
