Microsoft Interview Experience For SDE -II

???????? –

During the switch, Microsoft was one of the companies, to which I had applied. In mid-July, I received a call from a recruiter explaining the process and the next steps. In this blog, I will try to summarise the detailed experience of the whole interview process.

P.S. — I don’t remember all the questions I got during the interview(nervous of course), so I collaborated with one of my friends, who got interviewed recently to summarise the whole process.

????? -?: ?????? ?????? (??? ???????)

This round consisted of 2 coding questions. You need to have more than a 50% score to get shortlisted. The first question was of medium difficulty and the other one was hard.

The first question was a little tweak of the buy-sell stock problem i.e https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/

The second question was something like –

Given two arrays of bits(these are the sequence of bits in base -2):

  • A of length M, containing a sequence representing some integer X, and
  • B of length N, containing a sequence representing some integer Y

Write a function vector<int>add(vector<int> &A, vector<int>&B)

returning the shortest sequence of bits representing X+Y.

Example –

Input

A -> 011001011101011 (5730)

B -> 001001111101 (-2396)

Output

and -> 0101100010111 (A+B=3334)

I got the first problem 100% and 2nd problem 75% only.

????? ?: ???/ ????????? ??????? ????????? ( ?? ???????)

This round consisted of 2 DSA problems. It started with the introduction, followed by the overview of the work I do in my current role along with the tech stack I use.

The first problem was a medium-hard level problem on LinkedList—

Given a circularly doubly linked list, one node is broken ii.e.it’s not pointing to the expected next and prev node. Find that broken node and fix it.

The second problem was an easy-level problem —

Given a series of inputs in order fashion, construct a binary tree, traverse it in level order fashion and print the output.

????? ?: ?????? ????????? (?? ???????)

Although the time says 60 minutes, the discussion went for around 90 minutes. This round was a design round where the expectation was to propose the high-level design and the pseudo-code of the proposed solution. The question I was given was –

Design an alarm system where users should be able to create, update and delete an alarm. There should also be a mechanism used to receive the alarm at the scheduled time.

I was supposed to provide the HLD and the APIs for the CRUD operations. You can find many resources online for the same like https://www.focuslk.com/designing-an-alarm-clock/

The design problem my friend had got was —

Design a coding contest platform having the code and submission part.

Expect millions of submissions at the closure time. i.e. ~10^6 tps

https://www.youtube.com/watch?v=w_ebhH2swVk This is a good example for the same.

As these are design problems, there is no right or wrong answer to them. Just make sure that before starting you list down the requirements properly and keep communicating your thought process clearly to the interviewer throughout.

????? ?: ?????? ??????? ????? (?? ???????)

This started with the introduction, followed by DBDB-related questions and then finally the behavioural questions.

For the first 30min, I got questions like —

  1. What are the characteristics of a SQL database and a NoSQL database?
  2. If I have the use-case of receiving payment from the user, which database I should choose and why?
  3. In what cases you will choose a NoSQL database?
  4. If I have an existing table in SQL having GBs of data, is it possible to add a new column to it?

Given a table of employees, write the query to get the top 5 most earning employees who live in Banglore and have worked for more than 3 years.

I got some follow-up on these as well. But all the questions were around databases only.

In the next 30 minutes, I Ias asked a lot of behavioural questions and scenarios-based questions and then it ended with a series of questions I asked him about the team/company and in general.

I hope that this blog will prove beneficial for anyone gearing up for their interviews.

????? ??? !!!!