Philips Hiring Challenge | On-Campus OA (2022) | Design Parking System

Question · Posted Jun 2026

Problem Statement Design a parking system for a parking lot with three types of parking spaces: Big Medium Small The constructor receives the number of available parking spaces for each type. Implement the function addCar(int carType): carType = 1 → Big carType = 2 → Medium carType = 3 → Small Return true if a parking space is available for that car type; otherwise return false. Example Input ParkingSystem(1,1,0) addCar(1) addCar(2) addCar(3) addCar(1) Output true true false false  

The full answer & interview discussion are available to premium members.

Log in Create a free account