Microsoft | SWE | April 2024
Company: Microsoft
Role: SWE
Interview Stage: Phone Screen
Location: unknown
Year: 2024
Original Post Content:
Recruiter reached out on LinkedIn and sent OA link on the same day, to be completed in max 2 days.
It was 30 mins test with 2 easy coding questions and 15 MCQs.
Then 2 rounds were scheduled on same day.
First round - Implementation question related to Graph. Used BFS to solve.
Second round - Data structures question - Given input logs with ("country","state","region",count) write APIs to store them and retrieve count
Sample ("USA", "California", "Los Angeles", 100);
("USA", "California", "San Francisco", 50);
("India", "TN", "Kerala", 75);
if retrieve count for USA,California it should be 100+50
What will be optimal data structure that can be used here?
Got rejected in round 2, as could not come up with optimal solution
Can anyone help me with how this problem can be approached?