Meesho SDE-1 Backend LLD Machine Coding Round

meesho logo
meesho
SDE-1 Backend
April 30, 20254 reads

Summary

I experienced a 90-minute machine coding round for an SDE-1 Backend role at Meesho, where I implemented core functionalities of a clinical booking system and discussed a follow-up on concurrency, which was well-received.

Full Experience

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.

Interview Questions (2)

Q1
Clinical Booking System Machine Coding
System DesignHard

Design and implement a basic clinical booking system with the following core functionalities:

  • Doctors can register with their names and specialization (e.g., Cardiologist, Orthopedic).
  • Doctors can choose their availability slots (30 min slots were allowed).
  • Patients can register themselves.
  • Patients can 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.
  • A patient can have slots booked with other doctors on the same day.
  • If the slot is already filled by another patient, then patients could join a waitlist.
  • A patient can also cancel their appointments, in which case the first patient in the waitlist will get the available slot.
  • Patients and doctors can view their appointments for the day.
Q2
Concurrency in Booking System
System DesignHard

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?

Preparation Tips

Advice:

  1. Prepare for follow up questions from all design patterns.
  2. Keep your coding speed high to atleast cover all the core functionalities and add validations.
Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!