Upload Button Icon Add office photos

Microsoft Corporation

Compare button icon Compare button icon Compare

Filter interviews by

Microsoft Corporation Developer Interview Questions and Answers

Updated 12 Sep 2015

7 Interview questions

A Developer was asked
Q. Given a binary tree, connect each node to the node on its right at the same level. Assume each node has an extra pointer to perform the connection.
Ans. 

Connect nodes to their right in a binary tree using an extra pointer.

  • Traverse the tree using level order traversal

  • For each node, connect its right child to the next node in the level

  • If there is no next node, set the right child to null

A Developer was asked
Q. Given an array of numbers, return the same array containing only unique elements.
Ans. 

Return an array with only unique elements

  • Use a Set to store unique elements

  • Loop through the array and add each element to the Set

  • Convert the Set back to an array and return it

Developer Interview Questions Asked at Other Companies

asked in HARMAN
Q1. Which programming language do you regularly use at work?
Q2. Given a 2D array, find an element which is the maximum in its col ... read more
asked in HARMAN
Q3. What steps do you take to ensure accurate project estimates?
Q4. Write a formula to display A if A is present, display B if B is p ... read more
Q5. Can you describe method overloading versus method overriding? Doe ... read more
A Developer was asked
Q. Design an elevator system with 5 elevators and 50 floors. What design considerations determine which elevator responds to a button press on a given floor?
Ans. 

Design considerations for an elevator system with 5 elevators and 50 floors.

  • Traffic patterns and peak hours should be analyzed to determine the optimal number of elevators to be in operation at any given time.

  • Elevators should be programmed to prioritize stops based on the direction of travel and the proximity of the requested floor to the elevator's current location.

  • The system should be designed to minimize wait t...

A Developer was asked
Q. Given a 2D array, find an element which is the maximum in its column and minimum in its row. You are assured that at least one such element exists. You may return any one if multiple such elements exist. Wr...
Ans. 

Find element in 2D array which is max in column and min in row with minimum comparisons

  • Iterate over rows and columns to find max and min elements respectively

  • Compare the max element of a column with the min element of its row

  • Return the element if it satisfies the condition

  • Consider edge cases like multiple elements satisfying the condition

What people are saying about Microsoft Corporation

View All
a senior analyst
5d
Microsoft Assessment coming up—any prep tips?
Hey everyone, I have a Microsoft Assessment coming up. If you have any insights or advice on how to prepare, please share!
Got a question about Microsoft Corporation?
Ask anonymously on communities.
A Developer was asked
Q. Given two linked lists, find if they have a common node
Ans. 

Given two linked lists, check if they have a common node.

  • Traverse both lists and compare each node's memory address

  • Use a hash table to store memory addresses of nodes in one list and check for matches in the other list

  • If one list is shorter, traverse it first and then start traversing the longer list from the difference in length

A Developer was asked
Q. Given an array, find if it contains a majority element. An element is a majority element if it occurs more than 50% of times. Do it in O(n)
Ans. 

Find if an array has a majority element in O(n)

  • Iterate through the array and keep track of the count of each element

  • If the count of any element is greater than half the length of the array, return true

  • Otherwise, return false

A Developer was asked
Q. Given a sentence, write a function that returns the first word in the string and modifies the string to contain the remaining words.
Ans. 

Create a function to extract the first word from a sentence and modify the sentence to exclude that word.

  • Define a function that takes a string as input.

  • Use string methods to split the sentence into words.

  • Return the first word and modify the original string to exclude it.

  • Example: For input 'Hello World', return 'Hello' and modify to 'World'.

  • Handle edge cases like empty strings or single-word inputs.

Are these interview questions helpful?

Microsoft Corporation Developer Interview Experiences

1 interview found

Developer Interview Questions & Answers

user image Anonymous

posted on 12 Sep 2015

Interview Questionnaire 

8 Questions

  • Q1. Given a binary tree (not necessarily complete), connect a node to the node to its right (at the same level). Assume you have an extra pointer in the node to perform the connection
  • Ans. 

    Connect nodes to their right in a binary tree using an extra pointer.

    • Traverse the tree using level order traversal

    • For each node, connect its right child to the next node in the level

    • If there is no next node, set the right child to null

  • Answered by AI
  • Q2. Given a sentence, write a function, which when called, would return the first word in the string and modify the string to contain from second to the last word
  • Ans. 

    Create a function to extract the first word from a sentence and modify the sentence to exclude that word.

    • Define a function that takes a string as input.

    • Use string methods to split the sentence into words.

    • Return the first word and modify the original string to exclude it.

    • Example: For input 'Hello World', return 'Hello' and modify to 'World'.

    • Handle edge cases like empty strings or single-word inputs.

  • Answered by AI
  • Q3. Design an elevator system, where there are 5 elevators and 50 floors. What would be the design considerations on which elevator should come when a button is pressed on a given floor?
  • Ans. 

    Design considerations for an elevator system with 5 elevators and 50 floors.

    • Traffic patterns and peak hours should be analyzed to determine the optimal number of elevators to be in operation at any given time.

    • Elevators should be programmed to prioritize stops based on the direction of travel and the proximity of the requested floor to the elevator's current location.

    • The system should be designed to minimize wait times ...

  • Answered by AI
  • Q4. Differences between threads, processes and many such questions
  • Q5. Given two linked lists, find if they have a common node
  • Ans. 

    Given two linked lists, check if they have a common node.

    • Traverse both lists and compare each node's memory address

    • Use a hash table to store memory addresses of nodes in one list and check for matches in the other list

    • If one list is shorter, traverse it first and then start traversing the longer list from the difference in length

  • Answered by AI
  • Q6. Given an array, find if it contains a majority element. An element is a majority element if it occurs more than 50% of times. Do it in O(n)
  • Ans. 

    Find if an array has a majority element in O(n)

    • Iterate through the array and keep track of the count of each element

    • If the count of any element is greater than half the length of the array, return true

    • Otherwise, return false

  • Answered by AI
  • Q7. Given a 2 dim array, find an element which is the maximum in its column and minimum in its row. You are assured that atleast one such element exists. You may return any one if multiple such elements exist....
  • Ans. 

    Find element in 2D array which is max in column and min in row with minimum comparisons

    • Iterate over rows and columns to find max and min elements respectively

    • Compare the max element of a column with the min element of its row

    • Return the element if it satisfies the condition

    • Consider edge cases like multiple elements satisfying the condition

  • Answered by AI
  • Q8. Given an array of numbers, return the same array containing only unique elements in the array
  • Ans. 

    Return an array with only unique elements

    • Use a Set to store unique elements

    • Loop through the array and add each element to the Set

    • Convert the Set back to an array and return it

  • Answered by AI

Interview Preparation Tips

Round: Test
Experience: 1 written test + 3 rounds of technical interviews
For final offer: 3 rounds of technical interview

College Name: Veermata Jijabai Technological Institute, Mumbai [ VJTI ]

Skills evaluated in this interview

Interview questions from similar companies

I appeared for an interview before Mar 2021.

Round 1 - Face to Face 

(2 Questions)

Round duration - 45 minutes
Round difficulty - Medium

Technical Interview round with questions on DSA.

  • Q1. 

    Reverse Words in a String: Problem Statement

    You are given a string of length N. Your task is to reverse the string word by word. The input may contain multiple spaces between words and may have leading o...

  • Ans. 

    Reverse words in a string while handling leading, trailing, and multiple spaces.

    • Split the input string by spaces to get individual words

    • Reverse the order of the words

    • Join the reversed words with a single space in between

    • Handle leading, trailing, and multiple spaces appropriately

  • Answered by AI
  • Q2. 

    Reverse a Stack Using Recursion

    You are given a stack of integers. Your task is to reverse the stack using recursion without using any extra space other than the internal stack space used due to recursion...

  • Ans. 

    Reverse a stack using recursion without using any extra space other than the internal stack space.

    • Use recursion to pop all elements from the original stack and store them in function call stack.

    • Once the stack is empty, push the elements back in reverse order.

    • Base case of recursion should be when the original stack is empty.

  • Answered by AI
Round 2 - Face to Face 

(2 Questions)

Round duration - 45 minutes
Round difficulty - Medium

Technical Interview round with questions on DSA.

  • Q1. 

    Convert a Binary Tree to its Mirror Tree

    Given a binary tree, convert this binary tree into its mirror tree. A binary tree is a tree in which each parent node has at most two children. The mirror of a bin...

  • Ans. 

    Convert a binary tree to its mirror tree by interchanging left and right children of all non-leaf nodes.

    • Traverse the binary tree in a recursive manner.

    • Swap the left and right children of each non-leaf node.

    • Continue this process until all nodes have been processed.

  • Answered by AI
  • Q2. 

    Remove Nth Node from End of Linked List

    You are given a singly linked list with 'N' nodes, each containing integer data, and an integer 'K'. Your goal is to remove the 'K'th node counting from the end of ...

  • Ans. 

    Remove the Kth node from the end of a singly linked list.

    • Use two pointers approach to find the Kth node from the end.

    • Handle edge cases like removing the head node or removing the last node.

    • Update the pointers to remove the Kth node and reconnect the list.

  • Answered by AI
Round 3 - HR 

Round duration - 30 minutes
Round difficulty - Easy

Typical Managerial round.

Interview Preparation Tips

Eligibility criteriaAbove 6 months of experience24/7 customer private limited interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, System Design, Aptitude, OOPSTime required to prepare for the interview - 5 monthsInterview preparation tips for other job seekers

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application resume tips for other job seekers

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Final outcome of the interviewSelected

Skills evaluated in this interview

Developer Interview Questions Asked at Other Companies

asked in HARMAN
Q1. Which programming language do you regularly use at work?
Q2. Given a 2D array, find an element which is the maximum in its col ... read more
asked in HARMAN
Q3. What steps do you take to ensure accurate project estimates?
Q4. Write a formula to display A if A is present, display B if B is p ... read more
Q5. Can you describe method overloading versus method overriding? Doe ... read more

Interview Preparation Tips

General Tips: I asked my seniors about the interview process. Their guidelines were very helpful. Always try to bring the interviewer into your comfort zone. Also be confident and expressive while explaining. Explain your thought process while solving. Even though you don't get the solution the thought process might be very important for your selection.
College Name: NIT SURATHKAL

Interview Preparation Tips

Round: Test
Experience: Oracle had an online test which includes 3
Sections:
1. Programming: basic C++/java programming + data structure. One need to have good hand over oops
to score well in this section.

2. Aptitude: General Aptitude Questions

3. General Maths: Very simple maths problem (+2 level) but needs very very good speed.
Tips: Individual cutoff was not declared, but different cutoff for different profile is expected.
Oracle has no GD round.

Round: Interview
Experience: In 2nd round of interview, there was more programming, less resume based question and more emphasis on will I be comfortable in an IT sector. Some apti questions were also asked.

Round: Interview
Experience: 1st round was completely on resume based. Each and every project and intern is discussed in detail. Most of the extracurricular activities were also discussed. In the 1st interview, some basic program like fibonacci series by recursion, star pattern by loop etc were asked.

Round: Interview
Experience: Next round was HR. I was asked about the earlier 2 interviews and some basic HR questions.

College Name: IIT Roorkee

What people are saying about Microsoft Corporation

View All
a senior analyst
5d
Microsoft Assessment coming up—any prep tips?
Hey everyone, I have a Microsoft Assessment coming up. If you have any insights or advice on how to prepare, please share!
Got a question about Microsoft Corporation?
Ask anonymously on communities.

Interview Preparation Tips

Round: Test
Experience: The sections were Quantitative, Logical, Verbal and Computer Science.The three sections contained very basic questions of general aptitude while the Computer Science section contained questions on Database Management, OS, SQL and Programming Aptitude.

Round: Test
Experience: The question was to program a logic to test the correctness of a solved sudoku. We were allowed to code in C++, Java, C or pseudo code.

Round: Technical Interview
Experience: Were asked simple questions and program them like reversing string without temporary variables, finding the earlier date when entered as string and finding the difference in number of days between them.
I was asked to explain him my internship project in great detail and above all one should be prepared to answer the question 'Why IT?' if from a non IT background. Then I was asked to program a logic for 'Search and replace" tool of MS Word.

Round: HR Interview
Experience: Was asked about my background in detail and stressed again and again on 'Why IT?'. Then he asked me to prepare a summary on the merits and demerits of various Employee Data Management techniques for an organisation. For the end of the interview you should have a question which you would ask to the interviewer.

General Tips: Don't try to over emphasize the correctness of your logic if the interviewer finds a glitch. It irritates him. Be interactive in your HR round. In our case it was the VP of Oracle India who took the final round. So I asked him about his experience in the company. He was very happy to share it with me. But asses your interviewer before you put forth these queries cause your interviewer might not be as jolly as mine was.
Skills:
College Name: NIT Surathkal

Interview Preparation Tips

Round: Resume Shortlist
Tips: If you think it is worth it, write it in the resume.

Round: Technical Interview
Experience: I discussed a political party in one such interview in another company. He was impressed rather inspired.
Tips: All they are looking for in this interview is that you have a basic aptitude

Round: HR Interview
Tips: Try to be as real as possible. They know people and have great deal of experience. You cannot fake it.

General Tips: Peace yoo
College Name: IIT BOMBAY

Interview Questionnaire 

2 Questions

  • Q1. Ques on SQL,puzzles, C
  • Q2. Basic family background, hobbies, academics, why interest in software field, questions from the ppt they presentec earlier

Interview Preparation Tips

Round: Test
Experience: apti and logical reasoning ques  were not tough and with basic knowledge on C and SQL I could easily solve the questions
Tips: Just try to  maintain a good speed while solving

Round: Technical Interview
Experience: mostly they focus their questions based on the form that we had to fill. it had details about our extracurricular activities, main courses of interest, training and project work, software languages known, academics.
Tips: the form was to be filled with accuracy and only those points about which one is confident enough should be added

Round: HR Interview
Experience: it was just a normal interaction. they wanted to know the kind of person i am, my strengths and weakness. any impressive qualities unique of me. my favourite author. it lasted no longer than 10 minutes . and try to acquire as much background information as you about the company.
Tips: try to be honest with your answers. do not fake since they can easily catch you. do not give any such answers about which you are not confident or any view where you cannot defend yourself.

Skill Tips: I learned sql from w3school.com.
Skills: confidence, amicable nature, leadership qualities, participation in extracurricular activities, puzzle solving, Aptitude
College Name: NIT ROURKELA
Motivation: Its quite simple, I wanted to land with good job before i leave  nit.
Funny Moments: Since it was the first time i was facing an interview, so i asked my interviewer how were my answers.
Are these interview questions helpful?

I appeared for an interview in Oct 2016.

Interview Questionnaire 

5 Questions

  • Q1. What is inheritance?
  • Ans. 

    Inheritance is a concept in object-oriented programming where a class inherits properties and behaviors from another class.

    • Inheritance allows for code reuse and promotes modularity.

    • The class that is being inherited from is called the superclass or base class.

    • The class that inherits from the superclass is called the subclass or derived class.

    • The subclass can access the public and protected members of the superclass.

    • Inhe...

  • Answered by AI
  • Q2. Regular expressions in PhP
  • Ans. 

    Regular expressions in PHP are powerful tools for pattern matching and manipulating strings.

    • Regular expressions are defined using the preg_match() function in PHP.

    • They are used to search, replace, and validate strings based on specific patterns.

    • Regex patterns consist of a combination of characters and special symbols.

    • Modifiers can be added to the pattern to control the matching behavior.

    • Common regex functions in PHP in...

  • Answered by AI
  • Q3. What is polymorphism? Explain using a real life example
  • Ans. 

    Polymorphism is the ability of an object to take on many forms. It allows objects of different classes to be treated as the same type.

    • Polymorphism allows a single interface to be used for different types of objects.

    • It enables code reusability and flexibility in object-oriented programming.

    • For example, a parent class 'Animal' can have multiple child classes like 'Dog', 'Cat', and 'Bird'. They can all be treated as 'Anim...

  • Answered by AI
  • Q4. Discussion about projects.
  • Q5. Aggregate functions in dbms? And query questions related to that.

Interview Preparation Tips

Round: Test
Experience: 10 questions of aptitude containing English paragraph solving , Maths aptitude and also logical reasoning. Other 3 questions were of programming in any language comfortable.Two of the questions were partially done.In one of them only the logic was to be coded and in the other the error was to be corrected to give the correct output.
Duration: 1 hour 20 minutes
Total Questions: 13

Round: Technical Interview
Experience: They test your basic knowledge of programming, databases and how well you have worked with your projects.
There are actually three more rounds. 2 technical and one HR. I was not selected for them. Out of 40 students only 5 were selected after the final round.

Skills: Basic C/C++, DBMS, Multiple And Multi-level Inheritance, Polymorphism, PHP, Regular Expressions
College Name: Thapar University, Patiala

Skills evaluated in this interview

I appeared for an interview in Dec 2016.

Interview Questionnaire 

8 Questions

  • Q1. Given a 10 digit number, sort the individual digits of the number.
  • Q2. Write code for LCA in Binary Search Tree.
  • Ans. 

    The code for finding the Lowest Common Ancestor (LCA) in a Binary Search Tree (BST).

    • Start from the root node and compare it with the given two nodes.

    • If both nodes are smaller than the current node, move to the left subtree.

    • If both nodes are greater than the current node, move to the right subtree.

    • If one node is smaller and the other is greater, then the current node is the LCA.

    • Continue this process until the LCA is fou...

  • Answered by AI
  • Q3. Discuss a DBMS consisting of college faculty, professors, courses and students.
  • Ans. 

    A DBMS for managing college faculty, professors, courses, and students.

    • The DBMS should have tables for faculty, professors, courses, and students.

    • Each table should have appropriate attributes to store relevant information.

    • Relationships can be established between tables using foreign keys.

    • Queries can be used to retrieve information about faculty, professors, courses, and students.

    • The DBMS can be used to track enrollment...

  • Answered by AI
  • Q4. What extra curricular activities did you do in college?
  • Ans. 

    I was actively involved in coding competitions, hackathons, and programming clubs during college.

    • Participated in coding competitions such as ACM ICPC and Codeforces

    • Attended hackathons to work on real-world projects and improve problem-solving skills

    • Joined programming clubs to collaborate with peers and learn new technologies

  • Answered by AI
  • Q5. Do you seek for help if stuck in a problem?
  • Ans. 

    Yes, I believe in seeking help when stuck in a problem as it leads to faster resolution and learning.

    • I believe in collaborating with team members to brainstorm solutions

    • I am not afraid to ask for help from more experienced developers

    • I utilize online resources like Stack Overflow or documentation when needed

  • Answered by AI
  • Q6. What do you understand by teamwork?
  • Ans. 

    Teamwork is collaborating with others towards a common goal, utilizing each member's strengths and skills.

    • Collaborating with others towards a common goal

    • Utilizing each member's strengths and skills

    • Communicating effectively and openly

    • Respecting and valuing diverse perspectives

    • Sharing responsibilities and supporting each other

    • Celebrating successes as a team

  • Answered by AI
  • Q7. How do you tackle something that you can't find a solution to?
  • Ans. 

    When faced with an unsolvable problem, I break it down, research, seek help, experiment, and iterate until a solution is found.

    • Break down the problem into smaller, manageable parts

    • Research and gather information related to the problem

    • Seek help from colleagues, online communities, or experts

    • Experiment with different approaches or solutions

    • Iterate and refine the solution based on feedback and results

  • Answered by AI
  • Q8. Where do you want to see yourself after 5 years?
  • Ans. 

    In 5 years, I see myself as a senior software developer leading a team of developers on innovative projects.

    • Leading a team of developers on innovative projects

    • Senior software developer role

    • Continuing to learn and grow in the field

  • Answered by AI

Interview Preparation Tips

Round: Test
Experience: The test had a time limit. Every 10 minutes you had to do atleast 4 questions. It was quite fast paced. The questions were from basic coding, aptitude and debugging.
Tips: Learn to be fast at coding. Study from geeksforgeeks.com. Practice a lot of aptitude questions. Have a decent knowledge of basic coding.
Duration: 1 hour
Total Questions: 20

Round: Technical Interview
Experience: The interviewer started off by asking basic sorting questions. Followed by data structures and algorithms. And DBMS related questions in the end.
Tips: Have a good presence of mind. Understand the question asked properly. Be confident and keep discussing. Don't get nervous and solve the questions incorrectly. Have good grip over topics like sorting, DS, Algorithms and DBMS.

Round: Managerial Interview
Experience: There was a discussion upon the company's work in fields like Big Data, IoT. They asked me in detail about the projects mentioned in my CV. Other skills mentioned in CV were also discussed.
Tips: Have a good understanding of the projects you have mentioned in your CV. Be polite and confident while answering. Keep a general awareness of the current technical scenario.

Round: HR Interview
Experience: The round was based around my over all personality. They checked how would I be an asset to their company. They analysed my core values and capabilities of working in a team.
Tips: Show that you are willing to work in a team. Be confident and polite. Express your feelings and passion towards your job and the company. Explain your college extra curricular activities well.

College Name: IIT Varanasi

Skills evaluated in this interview

Interview Preparation Tips

Round: Test
Experience: 1 Psychometric Test
2. Analytical Aptitude
3 Logical Reasoning
4 Two coding Questions
5.Pattern Recognition
6.Essay writing

Tips: Do the coding Question first ,they are mot important ,if ur code doesn't run u are disqualified.
Practice on leetcode
Sectional Cutoff
Duration: 100 mins minutes
Total Questions: 103

Round: Test
Experience: Data base design of an ATM.E-R diagrams ,Class diagram and Normalization
Discussion on projects
A simple coding question
Heavy ball light ball puzzle
Cloud Computing
Public and Private Cloud
CRM ,SRM ,ERP
Asked me Floyd's Warshall Algo,told to implement it in a question
SQL queries





Round: Technical Interview
Experience: 1 asked me a puzzle man and bridge wid torch
2.asked me about TRIES
3.difference between primary key and unique key
4.asked to write query for nth highest salary
5.Asked me as sql injection
6. AES ,DES
7.Reverse a linked list


Round: Behavioural Interview
Experience: The interviewer was above 50.
1.Introduce yourself
2.why sap
3.situation based questions


Round: HR Interview
Experience: The lady was tough ...showed her intent in the PPT as well..
1.asked me about profile preference
2.about family
3.where would you see in next 2 years
4.why sap
5.nything about sap not mentioned in ppt(i was like null)
6.location preference


Skills:
College Name: NIT Srinagar

Microsoft Corporation Interview FAQs

How to prepare for Microsoft Corporation Developer interview?
Go through your CV in detail and study all the technologies mentioned in your CV. Prepare at least two technologies or languages in depth if you are appearing for a technical interview at Microsoft Corporation. The most common topics and skills that interviewers at Microsoft Corporation expect are microsoft, Development Management, Partner Development, Cloud and SQL.
What are the top questions asked in Microsoft Corporation Developer interview?

Some of the top questions asked at the Microsoft Corporation Developer interview -

  1. Given a 2 dim array, find an element which is the maximum in its column and min...read more
  2. Design an elevator system, where there are 5 elevators and 50 floors. What woul...read more
  3. Given a sentence, write a function, which when called, would return the first w...read more

Tell us how to improve this page.

Microsoft Corporation Developer Salary
based on 20 salaries
₹13.9 L/yr - ₹48 L/yr
322% more than the average Developer Salary in India
View more details
Software Engineer
2.5k salaries
unlock blur

₹15 L/yr - ₹54 L/yr

Senior Software Engineer
1.4k salaries
unlock blur

₹36.8 L/yr - ₹75.6 L/yr

Software Engineer2
1.2k salaries
unlock blur

₹22 L/yr - ₹72 L/yr

Software Developer
1k salaries
unlock blur

₹26.4 L/yr - ₹46 L/yr

Support Engineer
615 salaries
unlock blur

₹9 L/yr - ₹32 L/yr

Explore more salaries
Compare Microsoft Corporation with

Google

4.4
Compare

Amazon

4.0
Compare

Deloitte

3.7
Compare

TCS

3.6
Compare
write
Share an Interview