problemscpp
A collection of my answers to algorithm problems in c++.
|
#include <leetcode.h>
Public 成员函数 | |
ParkingSystem (int big, int medium, int small) | |
Initializes object of the ParkingSystem class. | |
bool | addCar (int carType) |
Checks whether there is a parking space of carType for the car that wants to get into the parking lot. | |
Private 属性 | |
int | big |
The number of slots for big parking space | |
int | medium |
The number of slots for medium parking space | |
int | small |
The number of slots for small parking space | |
在文件 leetcode.h 第 2247 行定义.
leetcode::design_parking_system::ParkingSystem::ParkingSystem | ( | int | big, |
int | medium, | ||
int | small ) |
Initializes object of the ParkingSystem class.
big | The number of slots for big parking space |
medium | The number of slots for medium parking space |
small | The number of slots for small parking space |
在文件 leetcode.cpp 第 6023 行定义.
bool leetcode::design_parking_system::ParkingSystem::addCar | ( | int | carType | ) |
Checks whether there is a parking space of carType for the car that wants to get into the parking lot.
carType | carType can be of three kinds: big, medium, or small, which are represented by 1, 2, and 3 respectively. A car can only park in a parking space of its carType. |
在文件 leetcode.cpp 第 6026 行定义.
|
private |
The number of slots for big parking space
在文件 leetcode.h 第 2248 行定义.
被这些函数引用 ParkingSystem() , 以及 addCar().
|
private |
The number of slots for medium parking space
在文件 leetcode.h 第 2249 行定义.
被这些函数引用 ParkingSystem() , 以及 addCar().
|
private |
The number of slots for small parking space
在文件 leetcode.h 第 2250 行定义.
被这些函数引用 ParkingSystem() , 以及 addCar().