Upload Button Icon Add office photos

Microsoft Corporation

Compare button icon Compare button icon Compare

Filter interviews by

Microsoft Corporation Software Developer Interview Questions and Answers

Updated 19 Mar 2025

146 Interview questions

🔥 Asked by recruiter 2 times
A Software Developer was asked
Q. Given a node in a binary tree, find the leftmost node in the same level.
Ans. 

Find the leftmost node in the same level as a given node in a binary tree.

  • Traverse the tree level by level using BFS

  • For each level, keep track of the leftmost node encountered

  • Return the leftmost node at the same level as the given node

A Software Developer was asked
Q. Given a room with points pertaining to different groups, check whether the connection is planar or non-planar, i.e., while connecting all the points in the same group, the wires of different groups should n...
Ans. 

Determine if connections between points in groups are planar or non-planar without overlaps.

  • Planar graphs can be drawn on a plane without edges crossing.

  • Non-planar graphs require edges to cross when drawn on a plane.

  • Example of a planar graph: A triangle connecting three points.

  • Example of a non-planar graph: K5 (complete graph with 5 vertices) cannot be drawn without crossings.

  • Use Kuratowski's theorem to check for ...

Software Developer Interview Questions Asked at Other Companies

asked in Amazon
Q1. Maximum Subarray Sum Problem Statement Given an array of integers ... read more
asked in Rakuten
Q2. Merge Two Sorted Arrays Problem Statement Given two sorted intege ... read more
asked in Amazon
Q3. Minimum Number of Platforms Needed Problem Statement You are give ... read more
asked in Cognizant
Q4. Nth Fibonacci Number Problem Statement Calculate the Nth term in ... read more
asked in PhonePe
Q5. Form a Triangle Problem Statement You are given an array of integ ... read more
A Software Developer was asked
Q. Given a sorted circular linked list, write a function to insert a new element into the list while maintaining its sorted order. Consider all cases, including inserting at the beginning, end, and middle of t...
Ans. 

Insert an element into a sorted circular linked list.

  • Find the correct position to insert the element based on its value

  • Update the pointers of the previous and next nodes to include the new node

  • Handle special cases such as inserting at the beginning or end of the list

  • Example: Inserting 5 into a list with values 1, 3, 4, 6, 7 would result in 1, 3, 4, 5, 6, 7

A Software Developer was asked
Q. How can you find the nth power of a number in the shortest computational time?
Ans. 

Use exponentiation by squaring algorithm to find nth power of a number in shortest computational time.

  • Use recursion to divide the power by 2 and multiply the base accordingly

  • If power is odd, multiply the base with the result of recursive call

  • If power is negative, take reciprocal of base and make power positive

  • Handle edge cases like power=0 and base=0 or 1

  • Time complexity is O(log n)

What people are saying about Microsoft Corporation

View All
a software developer
1w
Just Microsoft things!
Offer sleeping pods in office Employees turn unproductive Revenue drops Fire Thousands of employees in the name of "AI Revolution"!
FeedCard Image
Got a question about Microsoft Corporation?
Ask anonymously on communities.
A Software Developer was asked
Q. How do you find the nth largest number in a binary tree?
Ans. 

Find the nth largest number in a binary tree

  • Traverse the tree in-order and store the values in an array

  • Return the (n-1)th index of the sorted array in descending order

  • Use a max heap to keep track of the largest n elements

🔥 Asked by recruiter 2 times
A Software Developer was asked
Q. Given a linked list, invert every two nodes in the list. For example, given a -> b -> c -> d, the result should be b -> a -> d -> c.
Ans. 

The given linked list needs to be inverted in pairs of two nodes.

  • Iterate through the linked list, swapping every two adjacent nodes.

  • Keep track of the previous node to update the next pointers correctly.

  • Handle the edge cases of odd number of nodes or empty list.

A Software Developer was asked
Q. Two numbers are stored in two linked lists, with one digit in each node. Add the numbers and return the resultant sum in a linked list. eg. if LL1= 2 ­> 3 ­> 5, LL2= 1­>4­>5, result should be LL...
Ans. 

The question asks to add two numbers represented as linked lists and return the sum as a linked list.

  • Traverse both linked lists simultaneously, adding the corresponding digits and carrying over the carry.

  • Create a new linked list to store the sum digits.

  • Handle cases where one linked list is longer than the other.

  • Consider cases where the sum has an additional carry digit at the end.

Are these interview questions helpful?
🔥 Asked by recruiter 2 times
A Software Developer was asked
Q. Given 5 points in a plane, prove that there will be at least two points such that their midpoint is an integer.
Ans. 

Prove that given 5 points in a plane, there will be at least two points such that their midpoint is an integer.

  • Consider the x and y coordinates of the 5 points.

  • If any two points have the same x and y coordinates, their midpoint will be an integer.

  • If not, consider the differences between the x and y coordinates of each pair of points.

  • If any two pairs have differences that are both even or both odd, their midpoints ...

🔥 Asked by recruiter 2 times
A Software Developer was asked
Q. There is a roller which can have two types of wood blocks, 49 cm and 50 cm. Given two sensors 50 cm apart which call a function ring() whenever the sensor changes state, write the function ring() to calcula...
Ans. 

The function ring() calculates the number of blocks of both types based on sensor state changes.

  • Create a variable to keep track of the number of 49 cm blocks

  • Create another variable to keep track of the number of 50 cm blocks

  • Initialize both variables to 0

  • Whenever the sensor changes state, increment the corresponding block variable

  • Return the count of both block types as an array of strings

🔥 Asked by recruiter 2 times
A Software Developer was asked
Q. A file or a directory can be represented as a node with properties like ID, parent ID, name, and number of children (0 for a file). The file structure is a linked list of nodes where the parent directory al...
Ans. 

Implement a GUI to display a file structure using a linked list of nodes representing files and directories.

  • Each node has properties: ID, parent ID, name, and number of children.

  • The linked list maintains the order: parent directories appear before their children.

  • To display children, traverse the linked list and check for matching parent IDs.

  • Example: For a parent node with ID 1, find all nodes with parent ID 1 to d...

Microsoft Corporation Software Developer Interview Experiences

63 interviews found

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

LeetCode , hard questions on dynamic programming, graphs, and more.

Round 2 - Coding Test 

DSA, Cn, os, DBMS, ML

Round 3 - One-on-one 

(2 Questions)

  • Q1. Is relocation a possibility for this position?
  • Q2. Senior role is there
Interview experience
5
Excellent
Difficulty level
Hard
Process Duration
4-6 weeks
Result
Selected Selected

I applied via LinkedIn and was interviewed in Jul 2024. There were 3 interview rounds.

Round 1 - Coding Test 

It was bsed on DP, Trees and Graphs

Round 2 - Technical 

(2 Questions)

  • Q1. DSA based question
  • Q2. Code optimization problem with reduced time complexity
  • Ans. 

    Optimizing code for reduced time complexity by using efficient algorithms and data structures.

    • Use efficient data structures like hash tables, binary search trees, or priority queues.

    • Avoid nested loops and try to reduce the number of iterations.

    • Utilize dynamic programming or memoization to store and reuse intermediate results.

    • Consider using bitwise operations for certain calculations.

    • Optimize recursive functions by elim...

  • Answered by AI
Round 3 - One-on-one 

(2 Questions)

  • Q1. Questions about projects
  • Q2. Topics like dbms, os, cn

Interview Preparation Tips

Interview preparation tips for other job seekers - Study core topics and do hard level problems on leetcode

Skills evaluated in this interview

Interview experience
4
Good
Difficulty level
Hard
Process Duration
Less than 2 weeks
Result
Selected Selected

I appeared for an interview in Feb 2025, where I was asked the following questions.

  • Q1. Tell me about yourself.
  • Q2. Hello world this is just a mandatory question to put in this dont take this seriously

Interview Preparation Tips

Interview preparation tips for other job seekers - nothing this is just for accessing the ambitionbox website dont take it seriously guys

Software Developer Interview Questions & Answers

user image Tarun Jaiswal

posted on 30 Nov 2024

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

DSA, Graph, DP, Arrays

Interview experience
4
Good
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
Not Selected

I applied via Referral and was interviewed in Apr 2024. There were 4 interview rounds.

Round 1 - Coding Test 

OA Test with 2 medium level questions

Round 2 - Technical 

(2 Questions)

  • Q1. Similar to kth largest element in array
  • Ans. 

    Find the kth largest element in an array of integers using efficient algorithms.

    • Use a max-heap to extract the largest elements efficiently. Example: For array [3, 2, 1, 5, 6, 4] and k=2, return 5.

    • Alternatively, use quickselect algorithm for average O(n) time complexity. Example: In the same array, quickselect can find the 2nd largest.

    • Sorting the array and accessing the kth largest directly is simple but O(n log n). Exa...

  • Answered by AI
  • Q2. Similar to no. of islands of leetcode
  • Ans. 

    Count distinct islands in a grid of '1's (land) and '0's (water) using DFS or BFS.

    • Use Depth-First Search (DFS) or Breadth-First Search (BFS) to explore the grid.

    • Mark visited land cells to avoid counting them multiple times.

    • Each time you start a new DFS/BFS from an unvisited land cell, increment the island count.

    • Example: For grid [['1', '1', '0'], ['0', '1', '0'], ['0', '0', '1']], there are 2 islands.

  • Answered by AI
Round 3 - Technical 

(1 Question)

  • Q1. Machine Coding Round on your domain
Round 4 - HR 

(1 Question)

  • Q1. General HR questions were asked
Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Not Selected

I applied via Referral and was interviewed in Apr 2024. There were 2 interview rounds.

Round 1 - Coding Test 

2 problem related to graphs and dynamic programming 45min I was given to solve I was able to solve both of them and got shortlisted for the next round.

Round 2 - Technical 

(1 Question)

  • Q1. Started with Basic introduction about myself and my experiences then moved directly to a problem from leetcode based on hashing + sliding window I was able to provide the solution.

Interview Preparation Tips

Interview preparation tips for other job seekers - Prepare well for Data structures and algorithms prepare well for you role and responsibility .

Software Developer Interview Questions & Answers

user image Pranav Chaudhary

posted on 28 Nov 2024

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - HR 

(1 Question)

  • Q1. Why should we hire you
  • Ans. 

    I have a strong technical background, excellent problem-solving skills, and a passion for software development.

    • I have a Bachelor's degree in Computer Science and 5 years of experience in software development.

    • I have successfully completed multiple projects using various programming languages such as Java, Python, and JavaScript.

    • I am a quick learner and always eager to expand my knowledge and skills in the field of softw...

  • Answered by AI

Software Developer Interview Questions & Answers

user image Shubham Singh

posted on 23 Sep 2024

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-

I applied via Campus Placement and was interviewed in Aug 2024. There was 1 interview round.

Round 1 - HR 

(2 Questions)

  • Q1. Tell me about yourself
  • Ans. 

    I am a passionate software developer with experience in Java, Python, and web development.

    • Experienced in Java, Python, and web development technologies

    • Strong problem-solving skills

    • Team player with excellent communication skills

  • Answered by AI
  • Q2. About dsa and opps

Interview Preparation Tips

Interview preparation tips for other job seekers - good preparation of dsa
Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

1 hr wide varitey of question

Round 2 - Technical 

(1 Question)

  • Q1. Tell me about graph
  • Ans. 

    A graph is a data structure that consists of nodes (vertices) connected by edges.

    • Nodes represent entities and edges represent relationships between entities

    • Graphs can be directed or undirected

    • Common graph algorithms include depth-first search and breadth-first search

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - be prepared

Skills evaluated in this interview

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Coding Test 

2 easy level machine coding round.

Round 3 - One-on-one 

(1 Question)

  • Q1. 2 coding questions, one dp and another linked list.
Round 4 - One-on-one 

(1 Question)

  • Q1. 1 coding question on graph
Round 5 - One-on-one 

(1 Question)

  • Q1. Design question. Design a logger.
  • Ans. 

    A logger captures and stores application events for debugging and monitoring purposes.

    • Log Levels: Define levels like DEBUG, INFO, WARN, ERROR, and FATAL for categorizing logs.

    • Output Formats: Support multiple formats (e.g., JSON, plain text) for flexibility.

    • Log Rotation: Implement log rotation to manage file sizes and prevent disk overflow.

    • Asynchronous Logging: Use asynchronous methods to avoid blocking application perf...

  • Answered by AI
Round 6 - Technical 

(1 Question)

  • Q1. Techno managerial round.

Microsoft Corporation Interview FAQs

How many rounds are there in Microsoft Corporation Software Developer interview?
Microsoft Corporation interview process usually has 2-3 rounds. The most common rounds in the Microsoft Corporation interview process are Coding Test, Technical and One-on-one Round.
How to prepare for Microsoft Corporation Software 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 AWS, Cloud, Compliance, Computer science and Infrastructure.
What are the top questions asked in Microsoft Corporation Software Developer interview?

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

  1. A file or a directory can be represented as a node. The node has properties lik...read more
  2. You are given infinite sequence of continuos natural numbers-1,2,3,4,5,6.........read more
  3. Which of the following numbers cannot be represented accurately in > binary? > ...read more
How long is the Microsoft Corporation Software Developer interview process?

The duration of Microsoft Corporation Software Developer interview process can vary, but typically it takes about less than 2 weeks to complete.

Tell us how to improve this page.

Overall Interview Experience Rating

4.4/5

based on 30 interview experiences

Difficulty level

Easy 14%
Moderate 50%
Hard 36%

Duration

Less than 2 weeks 71%
2-4 weeks 21%
4-6 weeks 7%
View more
Microsoft Corporation Software Developer Salary
based on 1.1k salaries
₹23.9 L/yr - ₹40 L/yr
219% more than the average Software Developer Salary in India
View more details

Microsoft Corporation Software Developer Reviews and Ratings

based on 92 reviews

4.2/5

Rating in categories

4.1

Skill development

4.3

Work-life balance

4.1

Salary

4.1

Job security

4.2

Company culture

3.9

Promotions

3.9

Work satisfaction

Explore 92 Reviews and Ratings
Software Engineer
2.5k salaries
unlock blur

₹24.9 L/yr - ₹44 L/yr

Senior Software Engineer
1.4k salaries
unlock blur

₹37.5 L/yr - ₹75.7 L/yr

Software Engineer2
1.2k salaries
unlock blur

₹33 L/yr - ₹60 L/yr

Software Developer
1.1k salaries
unlock blur

₹23.9 L/yr - ₹40 L/yr

Support Engineer
608 salaries
unlock blur

₹14.4 L/yr - ₹24.7 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