- Published on
Microsoft | SDE 2 | Offer [Bengaluru]
- Author
- Shared Anonymously
YOE: 5
College: Tier 1
Current Company: startup
Recruiter reached out to me on linkedIn
Round 1: OA Round [1.30 hrs]
-
Hard Problem similar to this : https://leetcode.com/discuss/interview-question/4014581/HELP-PLEASE
-
Medium Level String problem [do not remember the exact problem]
Round 2: Coding Round [1 hr]
- I was asked to code a Linux File System.
- First, I gathered all the requirements, such as
- Create/Update file
- Read a file
- List files and directories
- Renaming/Deletion of file
- Copy/Move fileSearch a file, etc.
- I listed down 10 requirements, and then the interviewer asked me to code 4 functions out of it.
- I used Java in the Codility environment.
- I proposed a solution using a multilevel hashmap to store paths, directories, and file information.
- Each file, for simplicity, was represented as a text file.
- After 35-40 minutes, we completed the functions, and I walked through the code using examples provided by him.
- In the end, he asked me a few questions about optimizations, such as how to handle file updating/saving in a distributed environment.
Round 3: Coding and Design Round [1hr]
- I was asked to design and code a Distributed Cache.
- Initially, I gathered requirements such as:
- Set value for a key
- Get value for a key
- Discussed different eviction policies; I chose LRU for implementation but was asked to write code in such a way that it could be changed to a different policy later.
- Discussed data types for key/value; I chose strings for both.
- I proposed a solution using a hashmap and doubly linked list.
- After coding and running some examples, the interviewer was satisfied.
- Later, he asked about the time/space complexities of the code for different functionalities.
- Then, he asked me to refactor the design for a distributed environment.
- We discussed concurrent updates on the cache, handling CAP theorem, maintaining data consistency, and other database consistency-related questions.
Round 4: HM Round [1hr]
- I was asked to explain the architecture of one of my projects.
- I explained the project architecture by creating an HLD diagram on Excalidraw.
- He asked many follow-up questions about database choices, messaging queue choices, and system availability monitoring, etc.
- This discussion lasted about 30 minutes; in the last 30 minutes, he gave me a coding problem.
- He stated that I needed to find the maximum element from the array in the minimum time, and it was given that the CPU is an 8-core CPU.
- I proposed a multithreaded code solution.I coded the solution and walked him through the code using an example.
- Later, he asked a follow-up question: You are given an array of tuples, e.g., [(1, 1000), (2300, 2400), etc.], representing the allowed ranges to search in a potentially very large array. He just wanted to know the approach and did not ask me to code it.
- For the follow-up question, we discussed a few strategies, but he was not satisfied; in the end, using a hint, I proposed the correct solution.
- This round was quite challenging as he put me under a lot of pressure.
The recruiter reached out after 3-4 days for the last and final round.
Round 5: Final Round [1hr]
-
The interviewer asked me to explain one of my projects.
-
Similar to the Hiring Manager round, I explained the project architecture using an HLD diagram.
-
After discussing the projects and technologies used (the what and why of everything), we moved on to DSA.
-
He asked me to solve this problem - https://leetcode.com/problems/generate-parentheses/description/
-
After coding the first problem, he asked a follow-up question here - https://leetcode.com/problems/remove-invalid-parentheses/description/
-
For the follow-up question, we discussed the approach and coded it, but it was not working in the end; later, I realized that there was a logical mistake in the code.
-
But he was quite satisfied with the approaches.
-
Later, he asked me some behavioral questions like:
-
How do you manage conflicts in the team?
-
Can you give an example of a pressure situation where you still delivered the project?
-
What achievements are you most proud of?
-
I answered them using the STAR method.
One week later, the recruiter informed me that the feedback was positive and an offer was extended. I've provided detailed descriptions of each interview round, so if there are any questions about preparation or resources, I'm happy to discuss them. I will also share the compensation details and tag them here for reference.