Upload Button Icon Add office photos

Microsoft Corporation

Compare button icon Compare button icon Compare

Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards

zig zag pattern zig zag pattern

Filter interviews by

Clear (1)

Microsoft Corporation SDE-2 Interview Questions, Process, and Tips

Updated 28 May 2022

Top Microsoft Corporation SDE-2 Interview Questions and Answers

  • Q1. Rearrange String Problem Statement Given a string ‘S’, your task is to rearrange its characters so that no two adjacent characters are the same. If it's possible, return ...read more
  • Q2. Find Nodes at Distance K in a Binary Tree Your task is to find all nodes that are exactly a distance K from a given node in an arbitrary binary tree. The distance is def ...read more
  • Q3. My Calendar Problem Statement Given N events, each represented with a start and end time as intervals, i.e., booking on the half-open interval [start, end). Initially, t ...read more
View all 16 questions

Microsoft Corporation SDE-2 Interview Experiences

5 interviews found

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 28 May 2022

I was interviewed in Aug 2022.

Round 1 - Face to Face 

(1 Question)

Round duration - 60 minutes
Round difficulty - Medium

A problem solving round with 1 problem on DP. It was on a platform with a text editor provided. Was expected to solve the problem and write the code. Post initial discussion on the solution approaches came up with an optimized solution using Dynamic Programming and wrote the solution. Then some discussion on the Time and Space complexity of the solution. 

Interviewer was satisfied with the solution and also dry ran with 1 test case.

  • Q1. 

    Possible Words from a Phone Number: Problem Statement

    Given a string S composed of digits ranging from 2 to 9, determine all possible strings that can be created by mapping these digits to their correspon...

  • Ans. 

    Given a phone number string, generate all possible words by mapping digits to letters on a T9 keypad.

    • Create a mapping of digits to corresponding letters on a T9 keypad

    • Use recursion to generate all possible combinations of letters for the input phone number

    • Sort the generated strings in lexicographical order

  • Answered by AI
Round 2 - Face to Face 

Round duration - 60 minutes
Round difficulty - Hard

This round happened on the same day after 1st round. It was a Low level design round with one problem to be solved in 60 minutes.

Round 3 - Face to Face 

Round duration - 60 minutes
Round difficulty - Medium

This round happened on the same day after 2nd round. The platform used was codility. It was a System design/ Low level design round with one problem to be solved in 60min.

Round 4 - HR 

Round duration - 30 minutes
Round difficulty - Easy

It was an HR round with focus on the work ethics, culture and my prior experiences. The recruiter was trying to test my situation handling capability by asking different scenario based questions.

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 2 in BangaloreEligibility criteriaNo criteriaMicrosoft interview preparation:Topics to prepare for the interview - Data Structures, Graphs Algorithms, Dynamic programming, OOP concepts, Low level designTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Practice problems with consistency
Tip 2 : Learn and try to up solve
Tip 3 : Enjoy each problem and try different ways of solving it
Tip 4 : Brush up OOP concepts
Tip 5 : Practice hands on for Low level design by white board coding

Application resume tips for other job seekers

Tip 1 : Have 1-2 good quality projects.
Tip 2 : Try to maintain 1 page resume.
Tip 3 : Put things which you have in depth knowledge about in resume.

Final outcome of the interviewSelected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 14 Mar 2022

I applied via LinkedIn and was interviewed in Feb 2022. There were 5 interview rounds.

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 Resume tips
Round 2 - Coding Test 

Interview was around 1.15 hrs. Initially it was self introduction for both sides. Then a string manipulation related question was posted and asked to solve. At last it was queries to interviewer.

Round 3 - Case Study 

Total time 1hr. Self introduction for both parties.
Questions on CICD process in my project and automation ideas to handle errors with different scenarios. Then queries if any.

Round 4 - Coding Test 

Total time 1.15hr.
Self introduction and coding question related to linked list in codility. The question was enhanced depending on splving techniques. Finally queries.

Round 5 - HR 

(1 Question)

  • Q1. Why are you looking for a change?

Interview Preparation Tips

Interview preparation tips for other job seekers - It's ok if one doesnt know the exact answers for any questions. Attempt it with confidence. They will guide you got struck anywhere.
Listen to them keenly, they are always dropping hints in the middle
And if any doubts, always asks they prefer people with clarity as it's their motto.

SDE-2 Interview Questions Asked at Other Companies

asked in Walmart
Q1. Maximum Frequency Number Problem Statement Given an array of inte ... read more
asked in Atlassian
Q2. K Most Frequent Words Problem Statement Given an array of N non-e ... read more
Q3. Reverse String Operations Problem Statement You are provided with ... read more
asked in KhataBook
Q4. Alien Dictionary Problem Statement Ninja is mastering an unusual ... read more
asked in Zoho
Q5. Make Palindrome Problem Statement You are provided with a string ... read more

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 25 May 2022

I was interviewed before May 2021.

Round 1 - Video Call 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

  • Q1. 

    Rearrange String Problem Statement

    Given a string ‘S’, your task is to rearrange its characters so that no two adjacent characters are the same. If it's possible, return any such arrangement, otherwise re...

  • Ans. 

    Given a string, rearrange its characters so that no two adjacent characters are the same.

    • Iterate through the string and count the frequency of each character.

    • Use a priority queue to rearrange the characters based on their frequency.

    • Check if it's possible to rearrange the string without any two adjacent characters being the same.

    • Return 'Yes' if possible, 'No' otherwise.

  • Answered by AI
  • Q2. 

    Find Nodes at Distance K in a Binary Tree

    Your task is to find all nodes that are exactly a distance K from a given node in an arbitrary binary tree. The distance is defined as the number of edges between ...

  • Ans. 

    Find all nodes at distance K from a given node in a binary tree.

    • Perform a depth-first search starting from the target node to find nodes at distance K.

    • Use a recursive function to traverse the tree and keep track of the distance from the target node.

    • Maintain a set to store visited nodes to avoid revisiting them.

    • Return the list of nodes found at distance K from the target node.

    • Example: If the target node is 5 and K is 2 ...

  • Answered by AI
Round 2 - Video Call 

(1 Question)

Round duration - 60 Minutes
Round difficulty - Medium

  • Q1. 

    My Calendar Problem Statement

    Given N events, each represented with a start and end time as intervals, i.e., booking on the half-open interval [start, end). Initially, the calendar is empty. A new event c...

  • Ans. 

    Given N events with start and end times, determine if each event can be added to the calendar without causing a triple booking.

    • Iterate through each event and check if adding it causes a triple booking by comparing its interval with previous events

    • Use a data structure like a list or dictionary to keep track of booked intervals

    • Return 'True' if the event can be added without causing a triple booking, 'False' otherwise

  • Answered by AI
Round 3 - Video Call 

Round duration - 45 minutes
Round difficulty - Easy

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 2 in HyderabadEligibility criteriaNo criteriaMicrosoft interview preparation:Topics to prepare for the interview - Algorithms, System Design, Fundamentals, Problem Solving, BehavioralTime required to prepare for the interview - 2 MonthsInterview preparation tips for other job seekers

Tip 1 : Focus on fundamentals
Tip 2 : Focus on problem solving skills
Tip 3 : Be consistent

Application resume tips for other job seekers

Tip 1 : Do not bloat your resume with non-sense, add only what you have done and only major projects.
Tip 2 : Be crisp - adding 10 programming languages in your resume won't take you anywhere but understanding 1 language with heart is definitely a major plus.

Final outcome of the interviewSelected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 19 Dec 2020

I applied via Referral and was interviewed in Nov 2020. There was 1 interview round.

Interview Questionnaire 

3 Questions

  • Q1. Get excel column address based on number given.
  • Ans. 

    Get Excel column address based on number given.

    • Divide the number by 26 and get the remainder and quotient.

    • Convert the remainder to a character and add it to the result string.

    • Repeat until quotient is zero.

  • Answered by AI
  • Q2. Find if a given string exists in a given matrix of characters
  • Ans. 

    Find if a given string exists in a given matrix of characters

    • Iterate through each character in the matrix and check if it matches the first character of the given string. If it does, perform a depth-first search to check if the rest of the string can be formed from adjacent characters in the matrix.

    • Use a trie data structure to store all possible substrings of the matrix and check if the given string is present in the t...

  • Answered by AI
  • Q3. Video feed api design
  • Ans. 

    Designing a video feed API

    • Define endpoints for accessing video feeds

    • Include authentication and authorization mechanisms

    • Consider scalability and performance

    • Support different video formats and resolutions

    • Provide error handling and logging

    • Ensure data privacy and security

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - Prepare easy questions of Leetcode and prepare them well. Be true to yourselves, don't fake it. Be sure to know each and every aspect of projects in your resume very well.

Skills evaluated in this interview

Microsoft Corporation interview questions for designations

 SDE

 (6)

 SDE Intern

 (4)

 SDE (Software Development Engineer)

 (3)

 Program Manager 2

 (1)

 Data Scientist 2

 (1)

 Product Designer 2

 (1)

 Senior Software Engineer 2

 (2)

 Site Reliability Engineer 2

 (1)

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 28 May 2022

I was interviewed before May 2021.

Round 1 - Face to Face 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Easy

  • Q1. 

    Next Greater Element Problem Statement

    Given a list of integers of size N, your task is to determine the Next Greater Element (NGE) for every element. The Next Greater Element for an element X is the firs...

  • Ans. 

    Find the Next Greater Element for each element in a list of integers.

    • Iterate through the list of integers from right to left.

    • Use a stack to keep track of elements for which the Next Greater Element is not yet found.

    • Pop elements from the stack until a greater element is found or the stack is empty.

    • Assign the Next Greater Element as the top element of the stack or -1 if the stack is empty.

  • Answered by AI
  • Q2. 

    Clone Linked List with Random Pointer

    Your task is to create a deep copy of a linked list, where each node has two pointers: one that points to the next node in the list, and a 'random' pointer which can ...

  • Ans. 

    Create a deep copy of a linked list with random pointers.

    • Iterate through the original linked list and create a new node for each node in the list.

    • Store the mapping of original nodes to their corresponding new nodes.

    • Update the next and random pointers of the new nodes based on the mapping.

    • Return the head of the newly created deep copied linked list.

  • Answered by AI
Round 2 - Face to Face 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

  • Q1. 

    Smallest Window Problem Statement

    Given two strings S and X containing random characters, the task is to find the smallest substring in S which contains all the characters present in X.

    Input:

    The first...
  • Ans. 

    The task is to find the smallest substring in string S which contains all the characters present in string X.

    • Iterate through string S and keep track of characters in X using a hashmap

    • Use two pointers to maintain a sliding window with all characters from X

    • Update the window size and start index when a valid window is found

  • Answered by AI
  • Q2. 

    Connect Nodes at Same Level Problem Statement

    Given a binary tree, connect all adjacent nodes at the same level by populating each node's 'next' pointer to point to its next right node. If there is no nex...

  • Ans. 

    Connect adjacent nodes at the same level in a binary tree by populating each node's 'next' pointer.

    • Traverse the tree level by level using a queue.

    • For each node, connect it to the next node in the queue.

    • Set the 'next' pointer of the last node in each level to NULL.

    • Use constant extra space and do not alter the node structure.

  • Answered by AI
Round 3 - Face to Face 

(1 Question)

Round duration - 60 Minutes
Round difficulty - Easy

  • Q1. 

    Closest Palindrome Problem Statement

    You are given a string 'S' that represents a number. Your task is to find the closest palindromic number to this integer represented by 'S'. The closest number is defi...

  • Ans. 

    Find the closest palindromic number to a given integer represented by a string.

    • Convert the string to an integer and iterate to find the closest palindromic number.

    • Check for palindromic numbers by reversing the digits and comparing with the original number.

    • Handle cases where multiple closest palindromic numbers exist by choosing the smaller one.

  • Answered by AI
Round 4 - Face to Face 

(3 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

  • Q1. 

    Minimum Operation Needed to Convert to the Given String

    You are given two strings str1 and str2. Determine the minimum number of operations required to transform str1 into str2.

    Explanation:

    An operatio...

  • Ans. 

    Determine the minimum number of operations needed to transform one string into another by moving characters to the end.

    • Iterate through each character in str1 and check if it matches the first character in str2. If it does, calculate the number of operations needed to move it to the end.

    • If no match is found for the first character in str2, return -1 as transformation is not possible.

    • Repeat the process for each test case...

  • Answered by AI
  • Q2. 

    Snake and Ladder Problem Statement

    Given a Snake and Ladder Board with 'N' rows and 'N' columns filled with numbers from 1 to N*N starting from the bottom left of the board, and alternating direction each...

  • Ans. 

    Find the minimum number of dice throws required to reach the last cell on a Snake and Ladder board.

    • Use Breadth First Search (BFS) to explore all possible paths with minimum dice throws.

    • Keep track of visited cells and the number of dice throws needed to reach each cell.

    • Consider the effect of snakes and ladders on the next position.

    • Return the minimum number of dice throws needed to reach the last cell.

    • If it is impossible

  • Answered by AI
  • Q3. Can you provide a high-level design of a web crawler?
  • Ans. 

    A web crawler is a program that systematically browses the internet to index and collect information from websites.

    • Start by identifying the target websites to crawl

    • Implement a queue to manage the URLs to be crawled

    • Use a crawler algorithm to visit and extract data from web pages

    • Implement a mechanism to handle duplicate URLs and avoid infinite loops

    • Consider implementing a robots.txt parser to respect website crawling rul

  • Answered by AI
Round 5 - Face to Face 

(1 Question)

Round duration - 70 Minutes
Round difficulty - Medium

  • Q1. Design a system that can efficiently handle millions of requests to save or update a key-value pair, as well as millions of requests to read the value of a key.
  • Ans. 

    Design a system to handle millions of requests for key-value operations efficiently.

    • Use a distributed key-value store like Redis or Cassandra for storing data.

    • Implement sharding to distribute data across multiple nodes for scalability.

    • Use caching mechanisms like Memcached to reduce read latency.

    • Implement load balancing to evenly distribute incoming requests.

    • Use asynchronous processing for write operations to improve pe...

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI completed Computer Science Engineering from International Institute of Information Technology Bangalore. I applied for the job as SDE - 2 in BengaluruEligibility criteria5+ years of experience.Microsoft interview preparation:Topics to prepare for the interview - Graph Algorithms(BFS,DFS), Greedy Programming, Dynamic Programming,Problems involving Arrays, LinkedList, Queues, Stacks,High Level Designs and Low Level Designs.Time required to prepare for the interview - 6 MonthsInterview preparation tips for other job seekers

Tip 1 : Solve atleast 1 DS/Algo problem everyday
Tip 2 : Learn high level designs and low level designs

Application resume tips for other job seekers

Tip 1 : Have your skills defined in bold like worked on scaling the system which takes 100 million traffic per day etc, have experience in BigData, kafka, AWS/Azure erc
Tip2 : Show your achievements separately like Won ABC Hackathon, ICPC Regional finalist, etc

Final outcome of the interviewSelected

Skills evaluated in this interview

Get interview-ready with Top Microsoft Corporation Interview Questions

Interview questions from similar companies

SDE-2 Interview Questions & Answers

Cisco user image Anonymous

posted on 21 Mar 2022

I was interviewed before Mar 2021.

Round 1 - Coding Test 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Medium

2 coding question both and 15 MCQ

Only C , Java , Python are allowed

  • Q1. 

    Minimum Steps for a Knight to Reach Target

    Given a square chessboard of size 'N x N', determine the minimum number of moves a Knight requires to reach a specified target position from its initial position...

  • Ans. 

    Calculate the minimum number of moves a Knight requires to reach a specified target position on a chessboard.

    • Use breadth-first search (BFS) algorithm to find the shortest path for the Knight.

    • Consider all possible moves of the Knight on the chessboard.

    • Keep track of visited positions to avoid revisiting them.

    • Return the minimum number of moves required to reach the target position.

  • Answered by AI
  • Q2. 

    Maximum Size Rectangle Sub-matrix with All 1's Problem Statement

    You are provided with an N * M sized binary matrix 'MAT' where 'N' denotes the number of rows and 'M' denotes the number of columns. Your t...

  • Ans. 

    Find the maximum area of a submatrix with all 1's in a binary matrix.

    • Iterate over the matrix and calculate the maximum area of submatrices with all 1's.

    • Use dynamic programming to efficiently solve the problem.

    • Consider the current cell and its top, left, and top-left diagonal neighbors to calculate the area.

  • Answered by AI
Round 2 - Video Call 

(6 Questions)

Round duration - 45 minutes
Round difficulty - Easy

Around 6 am morning
2 interviewers

  • Q1. 

    Reverse Linked List Problem Statement

    Given a Singly Linked List of integers, your task is to reverse the Linked List by altering the links between the nodes.

    Input:

    The first line of input is an intege...
  • Ans. 

    Reverse a singly linked list by altering the links between nodes.

    • Iterate through the linked list and reverse the links between nodes

    • Use three pointers to keep track of the previous, current, and next nodes

    • Update the links between nodes to reverse the list

    • Return the head of the reversed linked list

  • Answered by AI
  • Q2. Can you explain synchronization in operating systems in detail?
  • Ans. 

    Synchronization in operating systems ensures proper coordination and communication between multiple processes or threads.

    • Synchronization is necessary to prevent race conditions and ensure data consistency.

    • Common synchronization mechanisms include mutexes, semaphores, and monitors.

    • Mutexes allow only one thread to access a resource at a time, preventing concurrent access.

    • Semaphores control access to a shared resource by ...

  • Answered by AI
  • Q3. Can you explain the OSI model and provide an example for each layer of data transfer?
  • Ans. 

    The OSI model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven layers.

    • Physical Layer: Transmits raw data bits over a physical medium (e.g. Ethernet cable)

    • Data Link Layer: Provides error detection and correction (e.g. MAC addresses in Ethernet)

    • Network Layer: Routes data packets between networks (e.g. IP addresses in Internet)

    • Transport Layer: Ensures reliable...

  • Answered by AI
  • Q4. What is a NAT router?
  • Ans. 

    A NAT router is a device that allows multiple devices on a local network to share a single public IP address for internet access.

    • NAT stands for Network Address Translation, which allows private IP addresses to be translated to a public IP address for communication over the internet.

    • NAT routers provide an added layer of security by hiding the internal IP addresses of devices on the network from external sources.

    • NAT rout...

  • Answered by AI
  • Q5. How would you compete with Google if you wanted to create a search engine?
  • Ans. 

    To compete with Google in search engine, focus on niche markets, improve user experience, and leverage AI technology.

    • Focus on niche markets where Google may not have as strong of a presence

    • Improve user experience by providing more relevant search results and faster load times

    • Leverage AI technology to personalize search results and enhance user experience

    • Invest in marketing and partnerships to increase visibility and us...

  • Answered by AI
  • Q6. What is the total amount of water on Earth?
  • Ans. 

    The total amount of water on Earth is approximately 1.386 billion cubic kilometers.

    • The majority of Earth's water is in the form of saltwater in the oceans, accounting for about 97.5% of the total water volume.

    • Only about 2.5% of Earth's water is freshwater, with the majority of that being stored in glaciers and ice caps.

    • The total amount of water on Earth is constantly cycling through the atmosphere, oceans, rivers, and

  • Answered by AI
Round 3 - Video Call 

(1 Question)

Round duration - 30 minutes
Round difficulty - Easy

Manager Round

  • Q1. Can you describe the challenges you faced during your master's thesis?
  • Ans. 

    I faced challenges in data collection, analysis, and time management during my master's thesis.

    • Difficulty in finding relevant research papers and data sources

    • Struggling with complex statistical analysis techniques

    • Managing time effectively to meet deadlines

    • Dealing with unexpected setbacks and technical issues

    • Balancing thesis work with other academic and personal commitments

  • Answered by AI
Round 4 - HR 

(1 Question)

Round duration - 10 Minutes
Round difficulty - Easy

Salary breakdown and Location preference

  • Q1. Are you satisfied with the salary breakup?

Interview Preparation Tips

Eligibility criteriaNoneCisco interview preparation:Topics to prepare for the interview - Computer Network Gate CS Level, Operating System college Level, Array and Linked List, Dynamic Programming, DFS and BFSTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Computer Network should be strong
Tip 2 : Exposure to system programming also helps
Tip 3 : At least 150 problems and C++ was not allowed so prepare accordingly

Application resume tips for other job seekers

Tip 1 : Project should be really good
Tip 2 : Write Computer Network and Operating System Courses in resume as course taken

Final outcome of the interviewSelected

Skills evaluated in this interview

Interview Questionnaire 

20 Questions

  • Q1. He asked me my specialization?
  • Q2. Why not further studies? (He had noted that I was third in my batch. He appeared impressed by that
  • Q3. He asked me to tell him about my favorite project
  • Q4. He then looked at my grades. He commented that my lowest grade – B- was in Digital Image Processing. I just looked at him like a doofus thinking of what to say. But he quickly added, ‘don’t worry, it happe...
  • Q5. He then asked me a question that had been asked in Round 4, written test:Describe an optimal algorithm to find the second minimum number in an array of numbers. What is the exact number of comparisons requ...
  • Q6. Given a polygon (could be regular, irregular, convex, concave), find out whether a particular point lies inside it or outside it
  • Ans. 

    To determine if a point is inside a polygon, use the ray casting algorithm.

    • Create a line from the point to a point outside the polygon

    • Count the number of times the line intersects with the polygon edges

    • If the count is odd, the point is inside the polygon; otherwise, it is outside

  • Answered by AI
  • Q7. He asked me to explain Canny’s algorithm to him. (this was because my DIP project was related to this)
  • Q8. Then, he gave me a practical problem to solve: Suppose you are given an image which contains some text and some photos. How do you find the location of the image?
  • Q9. Which are the four storage classes in C
  • Ans. 

    The four storage classes in C are auto, register, static, and extern.

    • Auto: default storage class for all local variables

    • Register: used to define local variables that should be stored in a register instead of RAM

    • Static: used to define local variables that retain their value between function calls

    • Extern: used to declare a global variable that is defined in another file

  • Answered by AI
  • Q10. Given a program: int i; int main() { int j; int *k = (int *) malloc (sizeof(int)); … } Where are each of these variables stored?
  • Ans. 

    i is stored in global data segment, j is stored in stack, k is stored in heap.

    • i is a global variable and is stored in the global data segment

    • j is a local variable and is stored in the stack

    • k is a pointer variable and is stored in the stack, while the memory it points to is allocated on the heap using malloc()

  • Answered by AI
  • Q11. Question on polymorphisms
  • Q12. He again went back to the first question he had asked me. Once again
  • Q13. Then he wrote out some code and asked me how the compiler will generate code for it. I gave some answer, but he was clearly not satisfied. I thought it was all over by then. Then, he asked me a DIP quest...
  • Q14. Given a set of words one after another, give me a data structure so that you’ll know whether a word has appeared already or not
  • Ans. 

    Use a hash table to store the words and check for existence in constant time.

    • Create a hash table with the words as keys and a boolean value as the value.

    • For each new word, check if it exists in the hash table. If it does, it has appeared before. If not, add it to the hash table.

    • Alternatively, use a set data structure to store only the unique words and check for existence in the set.

  • Answered by AI
  • Q15. He asked me some questions on Interprocess Communication: What’s a semaphore? How are they used? He would often pick out words from my answers and ask me what they meant. He wanted to make sure that I rea...
  • Q16. He then asked me some DB fundas. Transaction. Serializability, Consistent state, etc
  • Q17. Finally, he asked me whether I had any questions
  • Q18. There is a clock at the bottom of the hill and a clock at the top of the hill. The clock at the bottom of the hill works fine but the clock at the top doesn’t. How will you synchronize the two clocks. Obv...
  • Q19. There was one more puzzle.. I don’t remember it. but I do remember that we started discussing ways of generating large prime numbers
  • Q20. We also talked a bit about my phone browser project

Interview Preparation Tips

Round: Test
Duration: 15 minutes
Total Questions: 1

Round: Test
Duration: 30 minutes
Total Questions: 2

Round: Test
Duration: 30 minutes
Total Questions: 3

Round: Test
Total Questions: 4

Round: Technical Interview
Experience: 1.When I told him that I had none as I didn’t want to specialize in this stage, he was a little surprised but appeared satisfied with my reason.2.I told him that my profile clearly indicated that I’ve been trying to get into the industry via internships, industry-funded projects right from second year, second sem. I said that I was fully sure that I didn’t want to do MS anytime soon.3.I told him about the web-browser that I had developed for cell-phones. I thought that was the only project which was closest to what Adobe was working on. He appeared satisfied with my answers.4. So people, be fully prepared to explain any anomalous grades. I was prepared with the explanation of the W in the my grade-sheet but not of the B- in DIP. I know that this is really stupid considering that I was interviewing with Adobe. Don’t make this mistake.5.I screwed up, big time in this question. I had superficially discussed this question with my friend a while ago and he had outlined an algorithm which I thought that I had understood, but I hadn’t. I started off explaining it but got stuck in the middle. He sternly told me to read it up again. One solution that I could tell him, and which I had written in the test was this Use two variables – min and second min. Initialize them by comparing the first two elements of the array. This is (1) comparison. Then, go through the entire array, from index 2 to n-1 comparing each element, first with min and then with second min, updating each variable as necessary. This will involve a worst case of two comparisons for each element. Therefore, total number of comparisons = 2*(n-2) + 1 = 2*n – 3 comparisons.I’ll try to update this with a better solution, sometime soon.6.This is an easy, straight question from graphics. You shoot a ray parallel to the x-axis passing through this point. Start with odd parity. Change parity of ray each time it intersects an edge of the polygon (consider special case of when the line passes through a vertex of the polygon. Change parity only if it passes through a vertex which has one edge above it and one edge below the ray). If the parity of ray is even when it passes through the point, it is inside the polygon, else it is not.7.This is simple. Study DIP8.I gave various alternatives – from searching for RGB components, to using OCR.. he didn’t appear fully satisfied. I think he was looking for edge-detection, but that would fail, if the text contained tables, etc.

Round: Technical Interview
Experience: He was friendly at the start but this interview was my worst. He asked me my favorite subject. I said that it was Programming. (He laughed at that)

1. static, extern, register, auto2.I started off correctly, but he was able to confuse me. He brought in shared libraries, static libraries fundas into the discussion. We had a discussion for about twenty-minutes on this. Finally, he was happy with one of my answers because I had deduced which policy made sense and answered correctly. He said that out of all the people interviewed so far (I was second last), nobody had been able to answer all of these questions correctly.3.this is easy – get it from any C++ book. He tried to confuse me again, but this time I was ready and he was finally satisfied.Then he looked at my grades and said that out of all your grades, you have only two Bs and one of them is in Compilers. Why? (Damn it. three non-A grades and that’s all they ask about. What’s wrong with this world?!)Didn’t you like Compilers? “Not in particular”, I replied. “Fine. Now, I HAVE to ask you questions on compilers”, he said.4.He again went back to the first question he had asked me. Once again5.I first suggested that we capture only a small portion of the board. To locate that portion, we could search for the chalk in the prof’s hand – of course, taking care that it had the blackboard in the background (no point capturing a video of the prof scratching his chin, na?). Further, if the prof was writing only text, we could convert the video into text by OCR and then transmitting. Simple diagrams could also be reduced to a set of vector-graphics instructions (we rarely, see the prof shading stuff). I think he liked my approach, but was not completely satisfied. Anyway, we left it at that and went forward.6.I suggested various alternatives. but he kept helping me and finally, we came up with an array of pointers to 26-trees (each node of the tree has 26 children). Store every word as a path from the root to a leaf with pointers in the correct places. For example, hello would be stored as – pointer from ‘h’ index of the root array to a node which had a pointer from ‘e’ index of it’s array to a node which had a pointer from ‘l’ index of the array.. and so on. This is both time and space efficient.7.I was able to answer all his questions, but I made the mistake of telling him, when we started off that I didn’t know much about this subject as I had done it a long time ago. He was very annoyed at that, apparently because a lot of people before me had said this.8.I was able to answer all of them. I stumbled around a bit in a few questions where I was explaining correctly, but not using the keywords that he was looking for.9.I thought that I should say something to make him realize that I was not completely stupid and so asked him whether there was any logic to the order in which the short-listed candidates were called. This turned out to be a dumb move. The order was alphabetic and he sent me off with a parting shot, saying “You guys do pattern recognition and stuff and still you can’t recognize such a simple pattern” Me and my big mouth! Moral of the story: Don’t ask questions for the sake of asking.

Round: Puzzle Interview
Experience: After the first two interviews, this one was like having a warm batch after being cold and wet for days! I did well in this one.1.You have to go up the hill and come back, with horse, without horse, getting four equations to solve four unknowns – time to go uphill – with horse, without horse, time to go downhill – with horse, without horse. Then you can go up the hill and set the clock to ‘(time when you left) + (time to go uphill with horse)’2.  I told him the funda of Mersenee primes (luckily remembered it) and he was decently impressed.

General Tips: Finally hired by Adobe. Special thanks to AmbitionBox team. Really amazing site for sharing experience. That’s all for the Adobe. They are focusing on your approach and your coding skills. All the best.
Skills: Algorithm, Data structure, C++, C, DIP
College Name: BIT Mesra

Skills evaluated in this interview

I was interviewed before Jan 2021.

Round 1 - Face to Face 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

The interviewer asked me 2 questions related to DS/Algo in this round . Both the questions were of Easy-Medium difficulty and I was also required to code them in a production ready manner.

  • Q1. 

    Maximum Sum Path in a Binary Tree Problem Statement

    You are provided with a binary tree consisting of N nodes where each node has an integer value. The task is to determine the maximum sum achievable by a...

  • Ans. 

    Find the maximum sum achievable by a simple path between any two nodes in a binary tree.

    • Traverse the binary tree to find all possible paths and calculate their sums.

    • Keep track of the maximum sum encountered during traversal.

    • Consider paths that may include the same node twice.

    • Implement a recursive function to explore all possible paths.

    • Handle cases where nodes have negative values.

  • Answered by AI
  • Q2. 

    Intersection of Two Arrays Problem Statement

    Given two arrays A and B with sizes N and M respectively, both sorted in non-decreasing order, determine their intersection.

    The intersection of two arrays in...

  • Ans. 

    The problem involves finding the intersection of two sorted arrays efficiently.

    • Use two pointers to iterate through both arrays simultaneously.

    • Compare elements at the pointers and move the pointers accordingly.

    • Handle cases where elements are equal, and update the intersection array.

    • Return the intersection array as the result.

  • Answered by AI
Round 2 - Face to Face 

(3 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

This round had 2 questions of DS/Algo to solve under 50 minutes and one question related to Operating Systems.

  • Q1. 

    Next Greater Element Problem Statement

    You are provided with an array or list ARR containing N positive integers. Your task is to determine the Next Greater Element (NGE) for each element in the array.

    T...

  • Ans. 

    Find the Next Greater Element for each element in an array.

    • Iterate through the array from right to left

    • Use a stack to keep track of elements with no greater element to the right

    • Pop elements from the stack until finding a greater element or stack is empty

  • Answered by AI
  • Q2. 

    Number In Arithmetic Progression Problem

    Given three integers X, C, and Y, where X is the first term of an arithmetic sequence with a common difference of C, determine if Y is part of this arithmetic sequ...

  • Ans. 

    Check if a given number is part of an arithmetic sequence with a given first term and common difference.

    • Calculate the arithmetic sequence using the formula: nth term = X + (n-1) * C

    • Check if Y is equal to any term in the sequence to determine if it belongs to the sequence

    • Return 'True' if Y belongs to the sequence, otherwise return 'False'

  • Answered by AI
  • Q3. Can you define process and threads in operating systems?
  • Ans. 

    Processes are instances of programs in execution, while threads are smaller units within a process that can execute independently.

    • A process is a program in execution, consisting of code, data, and resources.

    • Threads are smaller units within a process that can execute independently.

    • Processes have their own memory space, while threads share the same memory space within a process.

    • Processes are heavyweight, while threads ar...

  • Answered by AI
Round 3 - Face to Face 

(3 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

This round had 2 questions of DSA of Easy-Medium difficulty and at the end I was asked a Puzzle to check my general problem solving ability.

  • Q1. 

    Max Product Subset Problem Statement

    Given an array/list arr of size n, determine the maximum product possible by taking any subset of the array/list arr. Return the result modulo 10^9+7 since the product ...

  • Ans. 

    Find the maximum product of a subset of an array modulo 10^9+7.

    • Iterate through the array and keep track of the maximum positive product and minimum negative product encountered so far.

    • Handle cases where the array contains zeros separately.

    • Return the maximum product modulo 10^9+7.

  • Answered by AI
  • Q2. 

    Populating Next Right Pointers in Each Node

    Given a complete binary tree with 'N' nodes, your task is to determine the 'next' node immediately to the right in level order for each node in the given tree.

    ...
  • Ans. 

    Implement a function to update 'next' pointers in a complete binary tree.

    • Iterate level by level using a queue

    • Connect nodes at each level using 'next' pointers

    • Handle null nodes appropriately

    • Ensure the tree is a complete binary tree

  • Answered by AI
  • Q3. You have two wires of different lengths that are both capable of burning for exactly one hour when ignited at both ends. How can you measure a time interval of 45 minutes using these two wires?
Round 4 - Face to Face 

(2 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

This round consisted of 2 questions from DSA where I was first asked to explain my approach to the interviewer with proper complexity analysis and then code the problems. The interviewer was quite friendly and also provided me some hints when I was stuck.

  • Q1. 

    Stack with getMin Operation

    Create a stack data structure that supports not only the usual push and pop operations but also getMin(), which retrieves the minimum element, all in O(1) time complexity witho...

  • Ans. 

    Implement a stack with push, pop, top, isEmpty, and getMin operations in O(1) time complexity without using extra space.

    • Use two stacks - one to store the actual elements and another to store the minimum element at each level.

    • When pushing an element, check if it is smaller than the current minimum and update the minimum stack accordingly.

    • When popping an element, also pop from the minimum stack if the popped element is t...

  • Answered by AI
  • Q2. 

    Split Array Into Maximum Subarrays Problem Statement

    You are given an integer array arr of size N. Your task is to split the array into the maximum number of subarrays such that the first and last occurre...

  • Ans. 

    Given an array, split it into maximum subarrays with first and last occurrence of each element in a single subarray.

    • Iterate through the array and keep track of the first and last occurrence of each element.

    • Use a hashmap to store the indices of each element.

    • Split the array whenever the last occurrence of an element is found.

  • Answered by AI

Interview Preparation Tips

Eligibility criteriaAbove 7 CGPAAdobe interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, System Design, Aptitude, OOPSTime required to prepare for the interview - 4 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

Interview Questionnaire 

12 Questions

  • Q1. Given a binary tree and an integer x, return whether the binary tree has a path from root to a leaf whose values sum to x
  • Q2. Gievn a binary tree and return all root to leaf node pathss row,col and value
  • Ans. 

    Return all root to leaf node paths in a binary tree with row, col and value.

    • Traverse the binary tree recursively and keep track of the current path.

    • When a leaf node is reached, add the path to the result array.

    • Include row, col and value of each node in the path.

    • Use an array of strings to store the paths.

  • Answered by AI
  • Q3. He then asked me to give test cases for testing this program
  • Q4. Given two unsorted arrays of numbers and asked me to find the intersection
  • Q5. GetMax() function for a stack in O(1)
  • Ans. 

    To get max value from a stack in O(1), maintain a separate stack to keep track of maximum values.

    • Create a separate stack to keep track of maximum values

    • Push the maximum value onto the stack whenever a new maximum is encountered

    • Pop the maximum value stack whenever the top element of the main stack is popped

    • Return the top element of the maximum value stack to get the maximum value in O(1)

  • Answered by AI
  • Q6. GetMax() function for a queue in O(1)
  • Ans. 

    To get max element from a queue in O(1) time complexity

    • Maintain a separate variable to keep track of the maximum element in the queue

    • Update the maximum element variable whenever a new element is added or removed from the queue

    • Return the maximum element variable when getMax() function is called

  • Answered by AI
  • Q7. Given an array in which consecutive elements differ by 1, i.e. a[i] – a[i + 1] = 1 or -1, and an element x, find the element in the array
  • Q8. Given an array, find the Next Greatest Element to the right for each element
  • Ans. 

    Find the Next Greatest Element to the right for each element in an array of strings.

    • Iterate through the array from right to left

    • Use a stack to keep track of elements

    • Pop elements from stack until a greater element is found

    • If no greater element is found, assign -1

    • Return the result array

  • Answered by AI
  • Q9. Given an expression, remove unnecessary parenthesis. For example if (((a + b)) * c) is given make it (a + b) * c, as it evaluates in the same way without those parenthesis also
  • Ans. 

    To remove unnecessary parenthesis from an expression, we need to apply a set of rules to identify and eliminate them.

    • Identify and remove parenthesis around single variables or constants

    • Identify and remove parenthesis around expressions with only one operator

    • Identify and remove parenthesis around expressions with operators of equal precedence

    • Identify and remove parenthesis around expressions with operators of different ...

  • Answered by AI
  • Q10. Given an array of integers, find the maximum product which can be formed by three numbers
  • Ans. 

    Find the maximum product of three integers in an array.

    • Sort the array in descending order.

    • Check the product of the first three numbers and the product of the first and last two numbers.

    • Return the maximum of the two products.

  • Answered by AI
  • Q11. Given an array of integers, find the length of the longest consecutive sub array which forms an AP
  • Ans. 

    Find length of longest consecutive sub array forming an AP from given array of integers.

    • Sort the array in ascending order

    • Iterate through the array and find the longest consecutive sub array forming an AP

    • Use a variable to keep track of the length of the current consecutive sub array forming an AP

    • Use another variable to keep track of the length of the longest consecutive sub array forming an AP seen so far

  • Answered by AI
  • Q12. Given a binary tree, connect all the nodes at the same level. Each node will have a next pointer; you have to make it point to the next node to its right in the same level. If there is no such node, make ...

Interview Preparation Tips

Skills: Algorithm, Data structure
College Name: NA

Skills evaluated in this interview

Interview Preparation Tips

Round: Resume Shortlist
Experience: I had sent my resume to the hiring group, Selection through telephonic interviews. I was interviewed by three different research groups  (once by each).
Tips: Factors in decreasing order of importance: CGPA each stage. Ability to explain your projects precisely. Ability to solve ''standard" logarithmic problems.  The way you think and put down your Answer is the most important. The final answer .s not so I important, and they prod you when you think out aloud anyway.

Round: Technical Interview
Experience: Almost- by default they ask about your previous projects/internships if they are relevant to the group. Ofher questions depend on the group you are interviewed by and your own profile, In my case it was machine learning, text mining etc. I was told about the research problem they were dealing with then and asked f or comments/suggestions/.inputs and a discussion followed.
Tips: Basically these are specialized Interviews so it's good to have sound knowledge of your domain (analytical and application skills are very much required).

Skill Tips: CGPA>9.0, 1f not (like me) relevant work done in the domain and in past internship.A recommendation from the professor is also a good add on.
College Name: IIT Madras
Contribute & help others!
anonymous
You can choose to be anonymous

Microsoft Corporation Interview FAQs

How many rounds are there in Microsoft Corporation SDE-2 interview?
Microsoft Corporation interview process usually has 5 rounds. The most common rounds in the Microsoft Corporation interview process are Coding Test, Resume Shortlist and Case Study.
What are the top questions asked in Microsoft Corporation SDE-2 interview?

Some of the top questions asked at the Microsoft Corporation SDE-2 interview -

  1. Find if a given string exists in a given matrix of charact...read more
  2. Get excel column address based on number giv...read more
  3. Video feed api des...read more

Recently Viewed

SALARIES

Amazon Prime Video

SALARIES

Intuit

SALARIES

One Click Technologies

INTERVIEWS

Intuit

No Interviews

INTERVIEWS

Intuit

No Interviews

SALARIES

Sedemac Mechatronics

SALARIES

PharmEasy

SALARIES

Venture Supply Chain

SALARIES

DXC Technology

INTERVIEWS

Intuit

No Interviews

Tell us how to improve this page.

Interview Questions from Similar Companies

Accenture Interview Questions
3.8
 • 8.2k Interviews
IBM Interview Questions
4.0
 • 2.3k Interviews
Oracle Interview Questions
3.7
 • 848 Interviews
Google Interview Questions
4.4
 • 826 Interviews
Amdocs Interview Questions
3.7
 • 514 Interviews
Zoho Interview Questions
4.3
 • 505 Interviews
Dell Interview Questions
4.0
 • 386 Interviews
Cisco Interview Questions
4.1
 • 372 Interviews
SAP Interview Questions
4.2
 • 283 Interviews
View all
Microsoft Corporation SDE-2 Salary
based on 90 salaries
₹17 L/yr - ₹62.8 L/yr
21% more than the average SDE-2 Salary in India
View more details

Microsoft Corporation SDE-2 Reviews and Ratings

based on 9 reviews

4.0/5

Rating in categories

2.9

Skill development

4.4

Work-life balance

3.8

Salary

4.3

Job security

3.9

Company culture

2.9

Promotions

3.3

Work satisfaction

Explore 9 Reviews and Ratings
Software Engineer
2k salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Senior Software Engineer
1.1k salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Software Engineer2
1k salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Software Developer
698 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Consultant
602 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Explore more salaries
Compare Microsoft Corporation with

Google

4.4
Compare

Amazon

4.1
Compare

Deloitte

3.8
Compare

TCS

3.7
Compare
Did you find this page helpful?
Yes No
write
Share an Interview