Razorpay | Machine Coding Round | SDE-2

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2024-09-07Added By Anonymous
Source: Link

Company: Razorpay
Role: SDE-2
Interview Stage: Machine Coding Round
Location: unknown
Year: unknown

Original Post Content:

Design a car parking application
There are two categories of cars: SUV and hatchback.
Maintain a count of how many SUV and hatchback cars enter the premise
Calculate the payment each car has to make based upon the rates as hatchback parking as 10 rupees per hour and SUV being 20 rupees an hour.
In case if hatchback occupancy is full then hatchback cars can occupy SUV spaces but with hatchback rates.
During exit there needs to be the system to inform the user how much they have to pay
Admin can see all the cars which are parked in the system

Expectations: Working code passing all the TC's mentioned during discussion, Code Readability.

Comments