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

Microsoft Corporation SDE Intern Interview Questions, Process, and Tips

Updated 13 Sep 2024

Top Microsoft Corporation SDE Intern Interview Questions and Answers

  • Q1. Given a string of containing lower case letters and upper case characters. Find the number of occurrences of each character. The question was further modified to include ...read more
  • Q2. Remove duplicate characters from a given string keeping only the first occurrences (i.e order should not change). For ex- if the input is ‘bananas’ the output will be ‘ba ...read more
  • Q3. Given a Y- linked list. Find the node at the intersection point

Microsoft Corporation SDE Intern Interview Experiences

4 interviews found

SDE Intern Interview Questions & Answers

user image Anonymous

posted on 13 Sep 2024

Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Aptitude Test 

Math and logical questions

Round 2 - Coding Test 

Medium - hard level questions of leetcode

Interview Preparation Tips

Interview preparation tips for other job seekers - prepare your resume well and be confident

SDE Intern Interview Questions & Answers

user image Anonymous

posted on 5 Jun 2024

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

I applied via Company Website and was interviewed in Dec 2023. There were 2 interview rounds.

Round 1 - Coding Test 

2 ques med leetcode ques

Round 2 - Technical 

(2 Questions)

  • Q1. SUbarray question was asked
  • Q2. Right view of a binary tree
  • Ans. 

    The right view of a binary tree shows the nodes that are visible when viewing the tree from the right side.

    • The right view of a binary tree can be obtained by performing a level order traversal and keeping track of the rightmost node at each level.

    • Nodes that are visible from the right side are the ones that are the rightmost at their respective levels.

    • For example, in the binary tree: 1 / \ 2 3 / \ /...

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - dSA karlo

Skills evaluated in this interview

SDE Intern Interview Questions Asked at Other Companies

Q1. Given a string of containing lower case letters and upper case ch ... read more
asked in Amazon
Q2. Find the square root of a number using only 4 basic arithmetic op ... read more
Q3. Remove duplicate characters from a given string keeping only the ... read more
asked in Carwale
Q4. What is caching and why do we need to do caching
Q5. Given a Y- linked list. Find the node at the intersection point

SDE Intern Interview Questions & Answers

user image Anonymous

posted on 31 Jul 2023

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

I applied via Campus Placement and was interviewed before Jul 2022. There were 3 interview rounds.

Round 1 - Coding Test 

Easy array, string based questions

Round 2 - Technical 

(2 Questions)

  • Q1. Questions based on computer fundamentals - OOPS, DBMS, Networking, Troubleshooting, Operating system
  • Q2. How do you change permission for a particular file?
  • Ans. 

    To change permissions for a file, you can use the chmod command in the terminal.

    • Use the chmod command followed by the permission code and the file name

    • Permission codes include 'u' for user, 'g' for group, and 'o' for others, along with 'r' for read, 'w' for write, and 'x' for execute

    • For example, to give read and write permissions to the user for a file named 'example.txt', you can use 'chmod u+rw example.txt'

  • Answered by AI
Round 3 - HR 

(1 Question)

  • Q1. Situation based questions

Interview Preparation Tips

Interview preparation tips for other job seekers - computer fundamentals is as important as DSA

Skills evaluated in this interview

SDE Intern Interview Questions & Answers

user image Anonymous

posted on 12 May 2015

Interview Questionnaire 

17 Questions

  • Q1. Given a Y- linked list. Find the node at the intersection point
  • Ans. 

    Given a Y-linked list, find the node at the intersection point.

    • Traverse both branches of the Y-linked list and compare nodes.

    • Use a hash table to store visited nodes and check for intersection.

    • If one branch is longer, traverse it until it matches the length of the other branch.

  • Answered by AI
  • Q2. Given a string of containing lower case letters and upper case characters. Find the number of occurrences of each character. The question was further modified to include the special characters as well. I w...
  • Ans. 

    Count the occurrences of each character in a given string including special characters.

    • Create test cases for empty string

    • Test for string with only one character

    • Test for string with all characters being the same

    • Test for string with all characters being different

    • Test for string with special characters

  • Answered by AI
  • Q3. Remove duplicate characters from a given string keeping only the first occurrences (i.e order should not change). For ex- if the input is ‘bananas’ the output will be ‘bans’. -----/ (second method)
  • Ans. 

    Remove duplicate characters from a string while preserving order.

    • Create an empty string to hold the result.

    • Iterate through each character in the input string.

    • If the character is not already in the result string, add it.

    • Return the result string.

  • Answered by AI
  • Q4. I was asked to introduce myself
  • Q5. Then there were couple of questions on the project i was working on. As my project was in java as the front end and oracle as the back end, i was asked few questions on multithreading and sql
  • Q6. I was then asked to explain the logic and the code to traverse a binary tree level by level but in spiral form. -----/
  • Q7. Logic and the code for the lowest common ancestor in a binary search tree. -----/
  • Q8. Complexity of both the above codes and why such complexities
  • Ans. 

    The complexity of the codes depends on the number of operations and loops used.

    • The first code has a complexity of O(n) as it uses a single loop to iterate through the array.

    • The second code has a complexity of O(n^2) as it uses nested loops to compare each element with every other element in the array.

    • The complexity of a code can also depend on the type of operations used, such as sorting or searching.

    • Complexity can be ...

  • Answered by AI
  • Q9. Brief me about your academic history
  • Ans. 

    I have a strong academic background with a focus on computer science and engineering.

    • Graduated with a Bachelor's degree in Computer Science from XYZ University

    • Completed a Master's degree in Electrical Engineering from ABC University

    • Took courses in data structures, algorithms, programming languages, and computer networks

    • Participated in various coding competitions and hackathons

    • Maintained a GPA of 3.8 throughout my acade

  • Answered by AI
  • Q10. What improvements can you do in your project? Are you working under a professor or just out of interest?
  • Ans. 

    I am working on this project out of interest and I believe I can improve it by implementing more advanced algorithms and incorporating user feedback.

    • Implement more advanced algorithms to improve accuracy

    • Incorporate user feedback to enhance user experience

    • Optimize code for faster performance

    • Add more features to increase functionality

  • Answered by AI
  • Q11. How would your peers describe you?
  • Ans. 

    My peers would describe me as a reliable and hardworking team player with excellent communication skills.

    • Reliable and consistent in meeting deadlines and completing tasks

    • Collaborative and supportive of team members

    • Clear and effective communicator, both verbally and in writing

    • Open to feedback and willing to learn and improve

    • Positive attitude and strong work ethic

  • Answered by AI
  • Q12. The project you are currently working on and why did you choose this?
  • Ans. 

    I am currently working on a web application for a client in the e-commerce industry.

    • The project involves developing a user-friendly interface for customers to browse and purchase products.

    • I chose this project because I have experience in web development and I find the e-commerce industry interesting.

    • I am also excited about the challenge of creating a seamless checkout process for customers.

    • The project requires collabor...

  • Answered by AI
  • Q13. How are you trying to improve?
  • Ans. 

    I am constantly seeking feedback and learning new skills to improve my performance.

    • Regularly seeking feedback from colleagues and supervisors

    • Attending workshops and training sessions to learn new skills

    • Setting personal goals and tracking progress towards them

    • Reflecting on past experiences and identifying areas for improvement

    • Reading industry publications and staying up-to-date with trends

  • Answered by AI
  • Q14. What keeps you motivated?
  • Ans. 

    The desire to learn and grow keeps me motivated.

    • Setting achievable goals

    • Celebrating small wins

    • Surrounding myself with positive people

    • Taking breaks and practicing self-care

    • Remembering my purpose and passion

    • Continuously learning and seeking new challenges

  • Answered by AI
  • Q15. How would your professors describe you and what are your weaknesses according to them?
  • Ans. 

    My professors would describe me as hardworking and detail-oriented. They have pointed out my weakness in public speaking.

    • Professors would describe me as hardworking and detail-oriented

    • Weakness in public speaking has been pointed out

    • Received positive feedback on assignments and projects

    • Collaborates well with classmates and participates in group discussions

  • Answered by AI
  • Q16. Why Microsoft?There were few other questions which i can’t recall now :p
  • Q17. What are your Short term and Long term goals?
  • Ans. 

    Short term goal is to learn and contribute to the company. Long term goal is to grow professionally and take on leadership roles.

    • Short term goal: Learn new skills and technologies

    • Short term goal: Contribute to the company's success

    • Long term goal: Grow professionally and take on leadership roles

    • Long term goal: Build a strong network in the industry

    • Long term goal: Achieve financial stability

  • Answered by AI

Interview Preparation Tips

Round: Test
Experience: time- 30 minutes.This was conducted on CoCubes.com ,there were around 25 questions of varying level of difficulty. Topics: C , C++ , Aptitude.Around 60 students out of 150 were shortlisted for the next round.

Round: Test
Experience: time – 90 minutesThis was conducted on the same day. There were two questions of data structure.1) Write a function to check whether the parenthesis ( “( )”, “{ }” , “[ ]” ) in a given string are balanced or not.

-----) Write a recursive function to make a list from two given Linked lists, that contain intersection of the elements present in the given lists inplace.37 students were shortlisted for the next round.

Round: Technical Interview
Experience: Time- 35 minsThe interview started with my introduction. Then there was a long discussion on my project. He told me the flaws in my project and asked me to tell how would i deal with them.

1) Given two arrays of integers( in random order), how would u determine the rank of an element.

For ex: let the two arrays be

     46 32 16 73 57 2 and

     86 7 98 3 75     rank (46) = 6

     rank (86) = 10

     rank (2) = 1i don’t remember the exact question but it was similar to this. Fairly simple. I suggested some approaches and i was expected to come out with the best approach.

then i was asked to code my solution and design the test cases for the same.2) I was asked about my favorite subject.3)Write and explain the code to connect nodes at same level in a binary tree.

----- after the fourth round some of us were called for the next round.

Round: HR Interview
Experience: It was the last round. It went pretty well.The experience was awesome and i found that the people over there are very humble and i really liked their helping attitude.

Round: Technical Interview
Experience: I was asked questions on OS-
-Differentiate between mutex and semafore variables?– What does a thread and a process share in common?– What is a deadlock ?
There were few questions on C++.– Polymorphism and runtime polymorphism.– What is a virtual destructor?I was asked if i had any queries and i asked about the work that interns will get to do in microsoft and the interview ended.Only 9 were shortlisted for the further interviews. I was lucky enough to be one of them.We were called to Microsoft India Development Center, Hyderabad.

General Tips: Some interview tips-Stay calm, CONFIDENT and keep yourself motivated.Be honest.Try to keep your approach clean and don’t mess up things in your’s as well as interviewer’s mind.Don’t think about the results, just enjoy the interview process with a free mindFocus on building your concepts strong.
College Name: NA

Skills evaluated in this interview

Microsoft Corporation interview questions for designations

 SDE

 (6)

 SDE-2

 (5)

 Software Intern

 (1)

 Intern

 (20)

 SDE (Software Development Engineer)

 (3)

 Software Developer Intern

 (24)

 Software Engineer Intern

 (5)

 Summer Intern

 (3)

Interview questions from similar companies

Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Technical 

(2 Questions)

  • Q1. Tree based question
  • Q2. Graph based question

Interview Preparation Tips

Interview preparation tips for other job seekers - Prepare with DSA

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 appeared for an interview 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

I appeared for an interview before Sep 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 90 mintues
Round difficulty - Easy

Timing it is around 1 pm, Environment is very friendly.

  • Q1. 

    Equilibrium Index Problem Statement

    Given an array Arr consisting of N integers, your task is to find the equilibrium index of the array.

    An index is considered as an equilibrium index if the sum of elem...

  • Ans. 

    Find the equilibrium index of an array where sum of elements on left equals sum of elements on right.

    • Iterate through the array and calculate the total sum of elements.

    • For each index, calculate the sum of elements on the left and right side and check for equilibrium.

    • Return the left-most equilibrium index found, or -1 if none exist.

  • Answered by AI
  • Q2. 

    Maximum Meetings Problem Statement

    Given the schedule of N meetings with their start time Start[i] and end time End[i], you need to determine which meetings can be organized in a single meeting room such ...

  • Ans. 

    Given N meetings with start and end times, find the maximum number of meetings that can be organized in a single room without overlap.

    • Sort the meetings based on end times.

    • Iterate through the sorted meetings and select the next meeting whose start time is greater than or equal to the end time of the previous meeting.

    • Return the selected meetings in the order they are organized.

  • Answered by AI
Round 2 - Video Call 

(2 Questions)

Round duration - 90 mintues
Round difficulty - Hard

Timing it is around 1 pm and Environment is good .

  • Q1. Explain how to overload the pre and post-increment operators in object-oriented programming.
  • Ans. 

    Overloading pre and post-increment operators in OOP involves defining special member functions for the class.

    • Define member functions for pre-increment (++obj) and post-increment (obj++) operators in the class.

    • For pre-increment, return a reference to the modified object after incrementing the value.

    • For post-increment, return a copy of the original object before incrementing the value.

    • Example: class Counter { int value; ...

  • Answered by AI
  • Q2. 

    Longest Zero Sum Subarray Problem

    Given an array of integers consisting of both positive and negative numbers, find the length of the longest subarray whose sum is zero. This problem will be presented wit...

  • Ans. 

    Find the length of the longest subarray with zero sum in an array of integers.

    • Iterate through the array and keep track of the running sum using a hashmap.

    • If the running sum is seen before, it means there is a subarray with zero sum.

    • Calculate the length of the subarray with zero sum and update the maximum length found so far.

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 1 in HyderabadEligibility criteria8 CGPA aboveAdobe interview preparation:Topics to prepare for the interview - Linked List, Binary Search Tree ,Queue, Array ,DP ,Graph ,RecursionTime required to prepare for the interview - 3 monthInterview preparation tips for other job seekers

Tip 1 : Practice Atleast 500 Questions
Tip 2 : Do atleast 1 good projects
Tip 3 : You should be able to explain your project

Application resume tips for other job seekers

Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.

Final outcome of the interviewSelected

Skills evaluated in this interview

Interview Questionnaire 

1 Question

  • Q1. Off-campus interviews in Bangalore

Interview Preparation Tips

Round: Test
Experience: Only a few students will get shortlisted who do all the questions correctly.

Round: Other Interview
Experience: First 4 rounds on day 1 and this are just to shortlist for more rounds on some other day.
Tips: They will focus on almost all the concepts of computer science.You need to practice a lot and start it right now. Should be easy if you have prepared well enough. Use your holidays to start preparing for placements.

General Tips: Sooner you start, better your placement will be as lack of practice & last day study works only for exams but never for interviews. You'll get enough time to prepare for interviews once you get shortlisted. Focus on it even if you are placed already.
Skill Tips: They will focus on almost all the concepts of computer science.
Skills: C , Aptitude
College Name: NIT SURATHKAL

Microsoft Corporation Interview FAQs

How many rounds are there in Microsoft Corporation SDE Intern 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 Resume Shortlist.
What are the top questions asked in Microsoft Corporation SDE Intern interview?

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

  1. Given a string of containing lower case letters and upper case characters. Find...read more
  2. Remove duplicate characters from a given string keeping only the first occurren...read more
  3. Given a Y- linked list. Find the node at the intersection po...read more

Tell us how to improve this page.

Microsoft Corporation SDE Intern Interview Process

based on 3 interviews

Interview experience

4.3
  
Good
View more

Interview Questions from Similar Companies

Oracle Interview Questions
3.7
 • 863 Interviews
Google Interview Questions
4.4
 • 840 Interviews
Amdocs Interview Questions
3.7
 • 516 Interviews
Zoho Interview Questions
4.3
 • 511 Interviews
SAP Interview Questions
4.2
 • 283 Interviews
Adobe Interview Questions
3.9
 • 234 Interviews
Salesforce Interview Questions
4.0
 • 227 Interviews
24/7 Customer Interview Questions
3.5
 • 176 Interviews
View all
Microsoft Corporation SDE Intern Salary
based on 4 salaries
₹1 L/yr - ₹8.4 L/yr
18% less than the average SDE Intern Salary in India
View more details

Microsoft Corporation SDE Intern Reviews and Ratings

based on 1 review

4.0/5

Rating in categories

2.0

Skill development

5.0

Work-life balance

2.0

Salary

4.0

Job security

2.0

Company culture

3.0

Promotions

2.0

Work satisfaction

Explore 1 Review and Rating
Software Engineer
2.1k salaries
unlock blur

₹13 L/yr - ₹50.9 L/yr

Senior Software Engineer
1.2k salaries
unlock blur

₹25 L/yr - ₹95 L/yr

Software Engineer2
1.1k salaries
unlock blur

₹20.4 L/yr - ₹72 L/yr

Software Developer
789 salaries
unlock blur

₹15 L/yr - ₹54 L/yr

Consultant
609 salaries
unlock blur

₹13 L/yr - ₹36 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