# Microsoft Interview Experience for SDE-1 (Off-Campus)

Last Updated : 25 Feb, 2022

Round 1 (Online Assessment Round) – 2 coding questions had to be solved within 90 minutes. The platform for the test was codility. Remember that in the codility platform system’s test cases are hidden. You can test the code against your test cases.

• There are N points given (numbered from 0 to N-1) on one plan. The point kth is at the coordinates (X[k], Y[k]), and the tag of the point is S[k]. We want to make a circle with a center at (0,0). The circle should not have two points with the same tag. What is the maximum number of possible points within the circle?
• Given a tree having N nodes, numbered from 0 to N-1. Each node can contain only one of the letters ‘a’ or ‘b’. An array A of length N is used to represent the tree. A[k] (for K from 0 to N-1) represents the parent of the kth node. Letters are represented as a string S[k]. You need to find the number of vertices on the longest path in the tree, such that no pair of adjacent vertices on the path would contain the same letter.

Fortunately, I could run both the codes. After a couple of days, I received a mail that I got selected for further interview rounds.

Interview Process: There were 3 interviews in total.

Interview Round 1 (Technical Interview): She introduced herself and asked me to introduce myself. Then she directly shifted to the data structures. She asked me two questions-

1. Given a tree (which has left, right, and previous pointers), you need to populate each previous pointer to point to its previous left node. If there is no previous left node, the previous pointer should be set to NULL.
2. Spiral print of a matrix.

In the end, she asked me if I had any questions. I asked her to share her experience and the team she is currently working with.

After a week, I got a call that I got shortlisted for the next round.

Interview Round 2 (Technical Interview): He introduced himself. Then, he asked me some questions about my project (around 5-10 minutes).

He then asked me if I was comfortable in solving questions on multi-threading. I told him that I had not learned multi-threading as a subject. So, he moved on to questions about data structures:

• Print all the possible permutations of a string. Then he asked me to modify my code so that there were no duplicates.
• To print all the subsequences of a string.

Since we had some time left, he asked another question. It was a scheduling question. He only wanted to know which data structure would fit best in the situation. I told priority queue, and he seemed satisfied. I don’t remember the exact question.

Luckily, I got selected for the next and the last round.

Interview Round 3 (Final AA Round): AA stands for “as appropriate”. This round was a mix of technical and managerial questions.

He started the interview with questions regarding definitions of time complexity and space complexity.

• What is the best time complexity?
• What is the best space complexity?

He then gave me a coding question.

• There are n gas stations along a circular route, where the amount of gas at the ith station is gas[i]. It costs cost[i] of gas to travel from the station to its next (i + 1) station. Given two integer arrays of gas and cost, return the starting gas station’s index if you can travel around the circuit once in the clockwise direction with enough gas, otherwise, return -1. He wanted an O(n) approach.
• He then asked me some questions about my projects, like why MongoDB? Advantages of it.
• He went on to ask about any product like Alexa, Google Home, etc. that I like. I said Google Home. Then he asked questions like how it knows what action to perform taking input as voice.
• Why Microsoft?

My interview ended 15 minutes earlier.

Final Verdict: After a week, I received a mail that I got selected for the full-time software engineer position.

Suggestions:

• Communicate well with the interviewer.
• Be honest. If you’re not good at any topic, be very clear in the first place.
• Show willingness to the interviewer about the opportunity.
• Keep coding.

I hope you enjoyed reading this. Happy learning and all the best!

Previous
Next