[ INFO ]category: Behavioral · Onsite difficulty: hard freq: first seen: 2024-05-17
[HARD][ONSITE]OnsiteSDE IISelected
$catproblem.md
Microsoft | SDE 2 | Offer
Years of Experience: 5
Recruiter contacted me via LinkedIn.
Round 1: Online Assessment Round [1.30 hrs]
A hard problem similar to "HELP PLEASE".
A medium-level string problem (details not recalled).
Round 2: Coding Round [1 hr]
I was asked to code a Linux File System. I outlined ten requirements, including file creation/update, reading, listing, renaming/deletion, copying/moving, and searching. The interviewer then requested that I code four functions.
I used Java in the Codility environment and implemented a solution using a multilevel hashmap to store paths, directories, and file information. Each file was represented as a text file for simplicity.
After coding and walkthrough, the interviewer asked about optimizations for file updating/saving in a distributed environment.
Round 3: Coding and Design Round [1 hr]
I was asked to design and code a Distributed Cache. Requirements included setting/getting values for keys and discussing eviction policies (LRU was chosen, but the code needed to accommodate other policies). Data types for keys/values were strings.
I proposed a solution using a hashmap and doubly linked list. After coding and testing, the interviewer inquired about time/space complexities. The design was then refactored for a distributed environment, discussing concurrent updates, the CAP theorem, and data consistency.
Round 4: Hiring Manager Round [1 hr]
I explained the architecture of one of my projects using an HLD diagram on Excalidraw, followed by questions about database and messaging queue choices, and system availability monitoring.
I was then given a coding problem: finding the maximum element from an array in minimum time on an 8-core CPU. I proposed a multithreaded solution and coded it.
A follow-up question involved an array of tuples representing allowed search ranges in a large array. We discussed several strategies before arriving at the correct solution.
Round 5: Final Round [1 hr]
I explained another project's architecture using an HLD diagram, discussing the technologies used.
I was asked to solve the "Generate Parentheses" problem, followed by a follow-up question on "Remove Invalid Parentheses". While the code for the second problem had a logical error, the approaches were well-received.
I answered behavioral questions using the STAR method.
The recruiter contacted me a week later with a positive feedback and offer.