Preparing for an interview? Check out Cracking the Coding Interview
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]

  1. Hard Problem similar to this : https://leetcode.com/discuss/interview-question/4014581/HELP-PLEASE

  2. Medium Level String problem [do not remember the exact problem]

Round 2: Coding Round [1 hr]

  1. I was asked to code a Linux File System.
  2. First, I gathered all the requirements, such as
  3. Create/Update file
  4. Read a file
  5. List files and directories
  6. Renaming/Deletion of file
  7. Copy/Move fileSearch a file, etc.
  8. I listed down 10 requirements, and then the interviewer asked me to code 4 functions out of it.
  9. I used Java in the Codility environment.
  10. I proposed a solution using a multilevel hashmap to store paths, directories, and file information.
  11. Each file, for simplicity, was represented as a text file.
  12. After 35-40 minutes, we completed the functions, and I walked through the code using examples provided by him.
  13. 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]

  1. I was asked to design and code a Distributed Cache.
  2. Initially, I gathered requirements such as:
  3. Set value for a key
  4. Get value for a key
  5. 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.
  6. Discussed data types for key/value; I chose strings for both.
  7. I proposed a solution using a hashmap and doubly linked list.
  8. After coding and running some examples, the interviewer was satisfied.
  9. Later, he asked about the time/space complexities of the code for different functionalities.
  10. Then, he asked me to refactor the design for a distributed environment.
  11. We discussed concurrent updates on the cache, handling CAP theorem, maintaining data consistency, and other database consistency-related questions.

Round 4: HM Round [1hr]

  1. I was asked to explain the architecture of one of my projects.
  2. I explained the project architecture by creating an HLD diagram on Excalidraw.
  3. He asked many follow-up questions about database choices, messaging queue choices, and system availability monitoring, etc.
  4. This discussion lasted about 30 minutes; in the last 30 minutes, he gave me a coding problem.
  5. 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.
  6. I proposed a multithreaded code solution.I coded the solution and walked him through the code using an example.
  7. 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.
  8. 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.
  9. 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]

  1. The interviewer asked me to explain one of my projects.

  2. Similar to the Hiring Manager round, I explained the project architecture using an HLD diagram.

  3. After discussing the projects and technologies used (the what and why of everything), we moved on to DSA.

  4. He asked me to solve this problem - https://leetcode.com/problems/generate-parentheses/description/

  5. After coding the first problem, he asked a follow-up question here - https://leetcode.com/problems/remove-invalid-parentheses/description/

  6. 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.

  7. But he was quite satisfied with the approaches.

  8. Later, he asked me some behavioral questions like:

  9. How do you manage conflicts in the team?

  10. Can you give an example of a pressure situation where you still delivered the project?

  11. What achievements are you most proud of?

  12. 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.

ReportMark as Helpful