Scala with mutable map
\nclass ParkingSystem(_big: Int, _medium: Int, _small: Int) {\n  var c = scala.collection.mutable.Map(1 -> _big, 2 -> _medium, 3 -> _small)\n    \n  def addCar(
```\nclass ParkingSystem(_big: Int, _medium: Int, _small: Int) {\n  var c = scala.collection.mutable.Map(1 -> _big, 2 -> _medium, 3 -> _small)\n    \n  def addCar(carType: Int): Boolean = c(carType) match {\n    case 0 => false\n    case _ => {\n      c.put(carType, c(carType) - 1)\n      true\n    }\n  }\n}\n```
['Scala']