Design a parking lot with three kinds of spaces: big, medium and small, with a fixed number of each. ParkingSystem(big, medium, small) sets the counts. addCar(carType) tries to park a car of type 1 (big), 2 (medium) or 3 (small); a car may only use a space of its own size. Return true and take the space if one is free, otherwise return false.
Design a parking lot with three kinds of spaces: big, medium and small, with a fixed number of each. ParkingSystem(big, medium, small) sets the counts. addCar(carType) tries to park a car of type 1 (big), 2 (medium) or 3 (small); a car may only use a space of its own size. Return true and take the space if one is free, otherwise return false.