Microsoft | SWE II | Hyderabad | Windows Team
Company: Microsoft
Role: SWE II
Interview Stage: Onsite
Location: Hyderabad
Year: unknown
Original Post Content:
Hi, I had my Microsoft Interview today as part of a Hiring Drive.
We had to give 2 interviews, and based on that they would decide if they will take the other 2 interviews.
In my opinion I did good, I didn't receive any call for further rounds so I guess I didn't make it.
Round 1: DSA
Given a File path reduce it to its canonical form.
Eg.
Input: /home/foo/bar/./../../app
Output: /home/app
I coded an O(N) time and space solution in Python.
Round 2: LLD
Design an Alert Monitoring System.
So there are machines and sensors. The sensor can be of multiple types, Temperature/Pressure etc. So each sensor had a lower and upper threshold value. If the value goes outside this range, an alert will be sent to the Alert Monitoring System, then a user can check it and change the state of the alert.
I created the following interfaces/classes:
Interface: Sensor
Class: TemperatureSensor, PressureSensor, AlertMonitoringSystem, SensorData, Machine, Alert
Enum: AlertStatus
How I implemented it was, the sensor will have a reference to the AlertMonitoringSystem and there would be a Queue, where the sensor will push its data periodically.
The AlertMonitoringSystem will check that data and if any is outside the threshold, an alert object will be created.
Opinion:
I don't think the Interviewer was very happy with my design. Based on discussion, I think he expected the AlertMonitoringSystem to go through all the sensors and check their data instead of sensors sending their data to a queue.
I said to him what I have mostly seen in monitoring tools and my project as well, is data is sent to a queue from there the system reads it and does necessary action.
Also he mentioned, "will the View where the User will see the alerts be a separate class?" I said I don't think it's required. We can have it, but unless we have multiple monitoring systems, it will not serve any purpose as the view will need to call the same method which will be part of the MonitoringSystem class. I don't think he was impressed by my answer. I may be biased here, as I never consider a "View" in any of my design. I think the frontend (view) will only call another backend API, so in a low-level design it should not be required.
At the end he also said, I did not show how the flow would be and objects would be created (I guess the Runner class which creates objects and simulates it). But at the start of the interview he himself told he is only interested in the interface/classes and how they are arranged.
My 2 cents:
1. I think the interviewer had a bias towards his own solution, in my opinion. Generally speaking, in low-level design there can be multiple ways to do the same thing. An interviewer should be open to it. If the interviewer thinks there are problems with my solution, they should be able to justify it with examples themselves. The best approach for an interviewer will be to modify the question at the end to see how the candidate can extend his solution, rather than expecting an extendable design based on assumptions which are not part of the initial question.
2. Recruitment Process: I think there is a complete lack of respect for the candidate's time. Recruiters had not provided the time when rounds 3 and 4 would be conducted if selected. Their numbers are not reachable, they are not replying to emails. If someone is rejected, it's more important to inform them first so they can carry out with their own activities, instead of waiting that the recruiter may contact them. (I stayed at home thinking they may call and schedule any moment). Most of the recruiters are partner employees, I don't think they have relevant experience or care how the recruitment process should happen.
I have other interviews scheduled for other teams at Microsoft, will see how that goes!