Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Microsoft Interview Experience SDE 1 off campus (8 months exp)

  • Difficulty Level : Expert
  • Last Updated : 04 May, 2019

1st round was skype interview:
Question 1 : Given a bst find 4 numbers which sum upto a given number .
without using extra space

Answer: Convert bst to dll and use 2 pointers approach O(n^3)

Hey geek! It's time to become a success story instead of reading them. Check out our most renowned DSA Self Paced Course, now at a student-friendly price and become industry ready. And if you are looking for a more complete interview preparation resource, check out Complete Interview Preparation Course that will prepare you for the SDE role of your dreams!

Feeling prepared enough for your interview? Test your skills with our Test Series that will help you prepare for top companies like Amazon, Microsoft, TCS, Wipro, Google and many more!

Question 2 : It was based on BST also, don’t remeber the question.



From 2nd round onwards it was on Microsoft Hyderabad campus:
Round 2:
Question 1: Given a rowwise and column wise sorted matrix find number of negative elements in it.
Expected time complexcity O(n).

Answer: Start from bottom left element and if element is negative move right and if positive move up counting the number of negattive elements in a row and keeping boundary condition in mind.

Question 2: Given a Array of String encode that array into a String such that decode function can decode using the encoded String only.

Answer : For each String add Length of string a delimiter and String to encoded String.
If String is “abcd”
add 4#abcd to encoded String

Round 3:

Question 1 : Given a binary tree and a list of nodes to be deleted, find the root node of each tree after deletion

For ex if tree is

            1
          /   \
         2     3
        /  \
       4    5 

and node to be deleted is 2, then answer will contain 1, 4, 5
O(n) single traversal.
Answer using postorder traversal.

Question 2: Given Dictionary of words and mobile Keypad, given number find all dictionary String starting from it.
https://www.geeksforgeeks.org/find-possible-words-phone-digits/ similar to this

Question 4:
Based on transforming 1 String to another, using graphs.

Round 3 : Manegerial Round:

General HR questions:
Why should we hire you?
Why do you want to change?
What do you do apart from projects?
One Technical Question:
Sort 50 GB large file of words.
Sorted chunks and then used heap.
Then told about the team i will be joining in details.

In every question they wanted Production ready code on paper.

Verdict: Selected.

My Personal Notes arrow_drop_up
Recommended Articles
Page :