I had my machine coding round of 90 min yesterday. The interviewer joined 15 minutes late, so the interview time extended 15 min than discussed time.
The interviewer shared hackerrank link which had question description which layed down all the requirements and features needed.
There were 7 features to be applied and other bonus features if I had time to code them up.
The question was a basic clinical booking system, where we had patients and doctors. Doctors could register with their names and their specialization like Cardiologist, Orthopedic etc. They can choose their slots of availability (30 min slots were allowed).
Patients could register themselves, book an appointment with the doctor of their concerns in the available slots. A patient can book only 1 slot with a doctor and it should be just a 30 min slot, they cannot extend it to 2 slots. But patient can have slots booked with other doctors in the same day
If the slot is already filled by another patients, then patients could join a waitlist. A patient can also cancel their appointments, in which case the first patient in waitlist will get the available slot.
Also patients and doctors can view their appoitnments for the day.
These were the core funtionalities required in the interview. I coded up these core functionalities and discussed my code and a few edge cases with the interviewer. He said the code looked good and asked me a follow up question about concurrency, i.e., asked if there were 2 patients trying to book the slot at the same time, how will you decide which patient gets the slot, like in bookmyshow, if there are 1000s of people booking at the same time, how is it decided which person gets the ticket. I could answer the follow up question and the time was also running out.
The interviewer was polite and quite the entire time I was coding.
Advice: