Microsoft Interview | Set 1
Last Updated :
03 Aug, 2024
Following are the details of my Microsoft interviews.
Date of Interviews: 30th July, 31st July and 3rd August, 2012
No of Rounds: 1 aptitude test, 1 coding round and 4 PIs
Type of Interviews: Campus Interview for freshers
Aptitude Test(60 mins) (30-7-12)
It was an online test. It consisted of 50 questions, of which 30 were aptitude based and 20 were technical.
30 aptitude based questions consisted of speed-time based, probability, etc.
20 technical question included C outputs, flowchart, finding correct code for prime no, Fibonacci no, etc.
Coding Round(60 mins)(31-7-12)
Three questions were there
- You have to rotate an n*n array right by 90 degree.
- Given a linked list containing 0s,1s or 2s. Sort it
- Two elements of BST are swapped by mistake. You have to restore the tree without changing its structure.
Note that you don’t have to write a function only, as happens in Amazon. Instead you are expected to write it from scratch along with main function and all the helping functions. My advice: Screw the instruction, write the function you are expected to write for all the three questions, then go for helping functions and main function.
Personal Interview(3-8-12)
Round 1(40 mins):
A binary tree is given. You have to check whether left node data is greater than right node data for all nodes.
My Query: What if either one of the left or right subtree is not present. Clarification: You can then assume max possible value for left data, if absent and min value for right node data.
I was asked to dry run my code for a tree. Also test cases were asked to check my code.
Round 2(80 mins):
- To find Inorder successor of a node in a binary tree, provided you have parent pointer.
- To find Inorder successor of a node in a binary tree,provided you do not have parent pointer. Test cases for both of them were asked.
- Given a linked list a random ptr also exists. Clone the original linked list. Also give the test cases.
- Construct a data structure which can push, pop and find minimum in O(1) time. Was asked to code it. Test cases were also asked and was asked to ensure that it works for duplicate elements also.
Round 3(80 mins):
- A file consists of numerous words in it. You have to print the 10 most frequent words. Data structures to be used were asked and was asked to finally code it.
- Test cases were asked for a railway portal.
- A function was there which accepts a number k and a linked list and deletes every kth node of that list. A function to test the correctness of the above function was expected to be coded.
- An extension of Question 3. What if function accepted an array of numbers instead of just one number and deleted multiples of array elements.
Round 4(40 mins):
- This round was easiest of all.
- Question 1: Write a modified strcmp function which ignores cases and returns -1 if s1 < s2, 0 if s1 = s2, else returns 1. Test cases were asked, as usual.
- Question 2: Write a function which checks whether the tree is height balanced or not. Give test cases also.
To my great relief, this time I was hired……….finally……. :D This article is compiled by Vinay Khetan. Many Many congratulations to Vinay for his selection.
All Practice Problems for Microsoft !
Similar Reads
Microsoft Interview Questions (3.5 years) Microsoft Corporation is a leading global technology company known for its software products, services, and hardware. Founded in 1975 and headquartered in Redmond, Washington, Microsoft has become one of the most valuable companies in the world, with a diverse portfolio that includes operating syste
1 min read
Microsoftâs most frequently asked interview questions | Set 2 Microsoft's most asked interview questions | Set 1Level - Easy Celebrity problem - Practice herePrint numbers in given range of bst - Practice hereRoof to leaf path sum - Practice hereLevel order traversal - Practice hereTransform to sum tree - Practice hereDelete middle of linked list - Practice he
1 min read
Microsoft Non-tech Coding round Round 1:Â There is only one round in the Microsoft screening for full-time as a fresher. The test was conducted by a company hired by Microsoft which conducts tests for the same and the test was taken on the platform tests.mettl.com, the invitation key was provided by the invigilators and the test wa
1 min read
How to Install and Use Add-ins for Microsoft Office In this article, we'll take you through everything you need to know about installing and using add-ins for Microsoft Office. Whether you're a pro or a complete beginner for Microsoft Office, you'll be maximizing your Office experience in no time. So, get ready to explore popular search terms like "f
7 min read
Dish Technology Interview Experience for SDE (On-Campus) I received this problem at an on-campus at Dish Technology for an SDE new grand position. We spent about half an hour on this problem. You have given a 32-bit unsigned integer, let's say it contains abcd where a,b,c, and d each are not characters but stored in 8 bits from 0 to 255 each, where the MS
1 min read