Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
9,927 views
in Interview-Experiences by Expert (4,460 points)
retagged by | 9,927 views

40 Answers

0 like 0 dislike

Microsoft | Off-Campus (Engage) | SDE |  2022 Grad

 

Below is my interview experience at Microsoft consisting of 3 rounds. Prior to receiving an interview invite, a 3 week long mentorship period was also conducted where we had to build a working application on the given theme.

 

Interview Experience:

Round 1:

  1. Given a string composed of a-z and also the letters B and C, where B denotes a backspace and C denotes a caps lock. The first 'C' denotes Caps lock on, then a second 'C' denotes caps lock off. Find the resultant string after resolving the string.

e.g. CrCellBax => Relax

Explanation: first C => caps lock on, therefore till now string becomes R, then second C => caps lock off.

Till now: Rell, B=> backspace => Relax

Kinda similar to this: https://leetcode.com/problems/backspace-string-compare/

2 . Given a snake sorted array, print the elements that lie within [low,high], low and high also included.

Snake sorted array:

1 2 3 4 5

10 9 8 7 6

11 12 13 14 15

(In zigzag manner)

Round 2:

  1. Implement to_str() function in c++, i.e. integer to a string. Further discussion on some C++ concepts.
  2. Sort array of 0 1 2.

eg. give array: 2 2 0 0 1 0 0 1 2 0 0 1

answer: 0 0 0 0 0 0 1 1 1 2 2 2

Round 3:

  1. Design powerpoint.

Functionalities to support:

— add image, text

— modify image, text

— undo operation

Image as in not actual image, make an Image class that accepts the image path.

Discussion over memory performance.

  1. Discussion on a question based on set.

 

The experience was great interviewing at Microsoft. I had my interview scheduled on 2nd Feb 2022, and I received my offer the very next day in the morning itself (^_^).

 

 

by Expert (4,460 points)
0 like 0 dislike

Microsoft | L60| Bangalore | Jan-2022

 

Status: 2.5 yrs of work ex

Position: Sde 3 at a renowned company.

 

The first round was a codility test comprising of 3 questions.(Medium-Hard LC Questions)

I got a call from the recruiter to join their event next week . In an event usually ,all the interviews are held on the same day back to back and every round is an elimination round.

 ROUND 1 (1 hr)

  • Brief intro . He majorly concentrated on my tech stack and asked questions related to java and kafka.
  1. How Kafka works- explanation of topic,partitioning, consumer groups.
  2. Difference between overloading and overriding with code.
  3. Equals and hashcode contract.
  4. Singleton design pattern in detail with demo of code .

 

 ROUND 2 :( 1 hr 15 min)

  • Brief Intro and Challenges faced in my current project.
  • Coding Question : How will you find the column name if a column number is provided just like in an excel sheet.
    For eg: Column 26 is "Z" and 28 is "AB". so given a number like 506 find the column name.
    I gave him all the approaches and coded the solution.
  • System design - Tiny URL with detailed explanation. I really had fun in this round as the interviewer was very friendly and we had proper discussion of all the components.He was very impressed with my approaches.

 

ROUND 3:( 1 hr)

After 2 days I got a call for the Hiring manager round which totally focussed on my work ex and projects. Be prepared with the in-depth knowledge of the technologies and architecture of your project . He asked me a lot of behavioral questions back to back ,it actually felt like a rapid fire round of Koffee with Karan :)

All the rounds were pretty good for me as I was well prepared on both coding and design side.

At one point , I became so rusty and almost forgot about solving DSA questions. It took me a while and a lot of consistency to prepare and trust me if I can do it,anyone can do it.

All the best!

 

 

by Expert (4,460 points)
0 like 0 dislike

Microsoft | SDE1 | Bay Area | Mar 2020

 

Status: New grad, MS CS

Position: SDE1 at Microsoft

Location: Sunnyvale, CA

Date: March 16, 2020

Work experience: 2 years

 

First phase (on campus / phone screening)

I chose on campus screening, this was in February, before shelter-in-place was ordered. This was the standard to tell me about yourself, experiences, and interests in an interview. After this I was called for onsite.

 

Second phase (onsite - 4 rounds)

This is virtual onsite due to covid19 shelter-in-place orders. It had 4 rounds, standard technical interviews.

Round 1:

 This round had 2 questions. First one was very easy. Maybe it's a warm-up question. The second was not a typical leetcode question, I struggled a bit, took some hints and finally solved it.

Q1: Given an integer, return the difference of product and sum of digits

Q2: Detect whether the given string is in scientific notation or not using state machine flow. Examples of scientific notation, 1e-3, 123e2.

 

Round 2: 

This round again had 2 questions. First one was related to topological sort. You can find both these questions on leetcode.

Q1: Given a set of tasks and its dependencies, return the possible ordering of tasks. The tasks may be cyclic as well.

Q2: Serialize and deserialize a M-ary tree

Couple of follow-ups on question 2.

 

Round 3:

 Design circular buffer using array. A read from the buffer will free up the slot. A write from buffer will either use an empty slot or overwrite the oldest slot.

 

Round 4:-

 This round was taken by the manager of that team. This round also included some behavioral questions.

Given a k-sorted array, return the sorted array. What is the time and space complexity?

Example of a k-sorted array: [4 5 2 1 6 3], expected answer [1 2 3 4 5]

Behavioral questions:

  1. Tell me about yourself?
  2. Why Microsoft?
  3. Any questions for me? [Never say nothing for this question :) ]

Overall the experience with the interviewers and hiring committee is positive. I took some hints in round 1, question 2 as I was unaware of the state-flow-diagram from a computer science perspective. I nailed all other rounds. Here are few interview tips for you:

  1. Never jump into coding the solution right away. Keep a rule to ask clarification questions. I would recommend doing this even when you are practicing on leetcode. Cultivating a new habit takes time :)
  2. It's fine even if you are struck at some point. Feel free to ask for help. It's always better than staying mute. Interviewers would like to judge on your capability of understanding hints and working on them.
  3. Once you are done coding, run a test case manually by hand. Walk through the code aloud with this test case. This will help in two things. One, it helps you to find unintentional bugs and the other it sends a positive signal that you test your code.
  4. Don't let one interview get you down. Even if one interview goes really bad, that's' completely fine. There are other interviewers who can vouch for you.

** I had two offers in hand, Amazon and Microsoft. I ended up signing a Microsoft offer :)

 

 

 

 

by Expert (4,460 points)
0 like 0 dislike

Microsoft Interview Experience for Machine Learning Internship | 2020 | ON CAMPUS

 

Round 1 (Written) :

62 mcq questions in 1 hour. The level of paper was tough. Only 7 were shortlisted. The questions were based on Machine learning Algorithms, probability and counting, and statistics. It was conducted on Mettl. If you are able to solve 50% of the part, then you can expect a call.

 

Round 2 (Technical Interview) :

Focus : Problem solving skills

The 1st question was based on the trees. I was given an input and a binary tree. My task is to delete all leaf nodes whose data is equal to the given input (wait it’s not that simple, you need to implement cascade delete in this question). I told him the approach and it was correct. Then he told me to write the code for it. I tried and reached very close to the result but missed one condition. Then he asked a few questions on neural networks, sentimental analysis. He gave me a problem about how to classify flight booking emails from other mails. I gave several ideas and approaches. It was an open ended question so it totally depends on the interviewer whether he likes your idea or not. After this round 1 was over. It lasts for 50 minutes.

Tip : Practice some questions on Trees and Graphs from gfg. Also read the puzzle section.

 

Round 3 (Face to face interview) :

Focus : Projects and Domain knowledge

He told me to introduce myself. Then he quickly jumped to my projects section and asked every project one by one in depth. He asked several things on Neural Network, CNN, Bagging Boosting, decision trees, activation layers. How to prevent overfitting, Regularization etc. How to mix more than one ML Algorithms. How to think, which algo should we apply in any particular scenario. That’s all about the second round. It lasts for 45 min.

 

Verdict : None of us got selected for this profile.

 

by Expert (4,460 points)
0 like 0 dislike

 

Microsoft | SDE 1 | Bangalore | November 2021 | OFFCAMPUS

 

Note: It was through Off-Campus Microsoft Engage Program. After the coding assessment, you will be assigned a mentor where you will have to show your work case in a period of 3 weeks. If you do not perform well during the mentorship program, you may not be called for the interviews. Lucky me, I got a direct interview call after the coding round.

Rounds: 

1 round on CV selection, 1 coding round, 3 weeks mentorship program (similar to an internship), and based on your performance in the mentorship, there would be interview rounds (normal - 3 Technical rounds). All rounds (including interviews) were conducted on the Codility platform.

Coding Round (90 minutes):

 Two questions were there ranging between medium-hard types. I solved both of them within 40 minutes.

  1. Almost similar to the "Session in BSU" (Educational CodeForces Round 49).
  2. Given N points (can be collinear) in the 2D plane. We are required to find 3 points such that the triangle formed by choosing these 3 points should not contain any other points inside the triangle.
    • Concept: You have to find the 3 closest points. Consider any point as a 1st point, then find the 2nd one which is closest to it using the DISTANCE FORMULA. Now you have 2 points, find the 3rd one which is closest to both of them (using the same concept), and also keep in mind that points should not be collinear (you can easily do this by checking that the slope of points 1 and 3 should not be equal to the slope of points 2 and 3).

Technical Round 1(based on DSA - 1 hr): The round was completed in 20 minutes only

 

Technical Round 2(DSA round - 1 hr): Took me almost 1 hour to write the full working code

 

Technical Round 3(Project and DSA round - 1 hr): 40 - 45 minutes for the project and rest for the coding problem

  • Detailed discussion on any one of the projects: Stacks and techs used, why you made this app, the problem faced, how did you manage to make your app efficient, database structure and schemas, functional and non-functional requirements, security, scalability, etc.
  • Problem very similar to this one: https://leetcode.com/problems/maximum-equal-frequency/

Note: Even if you are not able to write the complete and working code, show your approach. They tell you to write the code to see if you are able to write what you think.

Be positive and aloud during interviews. Don't be nervous and in a rush to answer the question. Take your time. Interviewers will help you whenever you get stuck. Believe in yourself and always in God.

 

** SELECTED.

 

 

by Expert (4,460 points)
0 like 0 dislike

Microsoft| SDE Intern| Redmond 
 

Round 1: (30 min At career college center):- 

Resume discussion for 10 mins.

1 question (Math + coding) Given an equation reduces its computing time.

 

Round 2: (45 min Onsite)

15 mins behavioral

1 med whiteboard coding - Search a regex pattern in a string (Brute force sufficient but bug free implementation required).

 

Round 3: (45 min Onsite)

15 mins behavioral

1 med whiteboard coding - Given a tree with parent pointers print inorder traversal without any extra space (recursion not allowed). Concise and bug free implementation required.

 

** Got an offer after 3 days of final round.

 

 

by Expert (4,460 points)
0 like 0 dislike

Microsoft | New Grad | Sunnyvale | Feb 2020 

Status: New grad, MS CS Top 50 CS school

Position: New Grad at Microsoft

Location: Sunnyvale, CA

Date: February 20, 2020

Hello I recently gave an onsite interview at Microsoft (Sunnyvale office). The position was not for a specific team. I got selected for the interview through my college career fair. I wanted to share the onsite interview questions as the leetcode discussion section has helped me a lot to prepare for the interview.

In order to prepare for the interview I did the entire Microsoft explore section in LC and did trees and linked list questions extensively because I heard they were Frequently asked.

Onsite Interview: (4 Rounds)

Round 1:

The interviewer started by asking questions from my Resume and about my current work exp in depth and we spoke about the technologies they used.

I cannot find this question online and it was a weird question:

Given a cache array where the data is stored in bytes. You have an API call which will call 4k bytes and return a byte array, so every time You have an API call it will read the next 4k bytes every time. You have a function that looks like read(nbytes, buffer_array). Where nbytes are the number of bytes required to put in buffer_array which is a char array. So basically you need to get 4k bytes using the api call and store bytes to char array. For the next read call you need to use the remaining bytes from the first api call and then again do an api call if necessary.

Example

read(1, buffer_array)

You have 0 bytes so you can do an API call

read4k()=> You have 4k bytes, You use 1 byte to return in buffer_array. Remaining are 4k-1 bytes

read(2k,buffer_array)

You already have 4k-1 bytes remaining from the previous api call so use that.

Now you have 2k-1 bytes remaining.

read(6k, buffer_array)

You have 2k-1 bytes.

But you need to return 6k bytes. You do an API call. Still the total bytes you have are 2k-1+4k = 6k-1

You again do an API call. Which gives you 10k-1 bytes and then you can return 6k bytes in the buffer array.

I got really stuck in starting as I didn’t know that Python had a buffer_array and then I didn't know how to convert a byte array into a char array. Later on the interviewer said let's say we have a toCharArray(). After that it was a pretty straightforward solution.

 

Round 2 :-

The interviewer didn’t ask me anything based on my resume or work experience. He started shooting questions about distributed systems which I didn’t expect to be asked as I thought the new grad doesn't have system design questions. But as I have some work experience I had to come up with some answers.

I was asked to design an online ticketing system.

Later on to solve a 2-sum with O(1) space and implement merge sort.

 

Round 3:-

I was asked to serialize and deserialize a binary tree. 

He then asked me many questions regarding databases from my Resume.

Round 4 :-

He asked me to implement HashMap using the primitives of Java. He was really unprofessional and even though I gave the right solution in the first 5 minutes. He seemed dissatisfied, continuously looking at his phone and interrupting me to take phone calls. He left the room after 20 minutes telling me I am free to leave.

Overall experience:

It was a weird match by Microsoft I guess as the team I was interviewing for was Azure networking team and I have no Networking experience whatsoever. Also all my interviewers were managers of sister teams and they didn’t have much coding knowledge and so they interviewed me on design and analysis skills rather than coding skills. I hope this helps others who are interviewing at Microsoft.

 

** REJECTED.

 

by Expert (4,460 points)
0 like 0 dislike

Microsoft | SDE-2 | Redmond | Jan 2022  

YOE: 3.5 years at Fortune 100 company

B.S degree in Computer Science from a state university

 

Recruiter found me on Linkedin and I went ahead and did the codility - online assessment

Passed all 3 tasks on the codility - Leetcode Easy and Medium and a small debug session.

Not too hard at all.

 

Interview Round:- 

Round 1:- 

Started off with behavioral questions like what were your responsibilities in your last role and small introduction about ourselves.

Followed by the technical question -

https://leetcode.com/problems/basic-calculator-ii/

I demonstrated my thought process well with a stack and did it in O(n) space and time.

Interviewer wanted the O(n) time and O(1) space - but I couldn't solve it until after I saw the Leetcode solution after the interview.

I couldn't run my code and if you've done this problem before you would know:

I accidently typed 'else if ch in ops or i == len(s) - 1:' < - when it should just be an if - brain fart

I think I failed this because I didn't get the optimization and because of this small mistake above. Can someone confirm?

Round 2 :-

Small introduction about each other and something about my resume.

https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/

Answered it well and didn't need to write the test case, since the interviewer wanted to see if I could code. With extra time, I was asked a medium dp problem. But I didn't have time to write it up. But explained my through process and explained the brute force and dp approach and how I would solve it. I was on the right track. The interviewer mentioned they weren't expecting me to solve it, because it took them 2-3 hours to understand lol. I thought we were only asked 1 technical question per round, and wasn't expecting 2. Can someone confirm?

Round 3 :- 

Asked behavioral questions like tell me about a time? Difficult co-workers? Went over my resume

https://leetcode.com/problems/add-two-numbers/

Solved the problem with O(n) time and O(1) space. Interviewer was happy and asked about life at Microsoft.

Round 4 :- 

Not a leetcode or system design question. I couldn't answer it. Essentially they wanted an O(1) get/insert/delete operation and you're given data inputs that can vary in anything like int, float, doubles, objects, arrays, tuple, any data structure you can think of.

Got a call the next day from my recruiter. I was rejected. I found Microsoft interviews pretty chill and I'm happy that they straight up asked questions directly from Leetcode, making  life much easier. I was almost close on getting the job and it gave me more confidence. I'm going to go ahead and apply for other Microsoft positions.

Please provide any valuable feedback or questions.

Good Luck !

** REJECTED.

 

 

by Expert (4,460 points)
0 like 0 dislike

Microsoft | L64 | Hyderabad | Feb 2021 

 

* Finally my turn has come after a year of regular practice and hard work.

Status: 16 yrs experience in Top MNC outside FAANG

Position: L64

Location: Hyderabad

Date: Jan 2021.

 

Recruiter contacted me on linkedin. Scheduled an interview in the last week of jan.

Completed 3 rounds in a day, round4 and 5 completed in the next week.

 

Round 1:
Leetcode medium question related to strings and palindrome
Able to explain the naive approach and quickly came up with a better approach
Coded quickly and answered all queries.

 

Round 2:
Leetcode medium question - need to implement one of the data structure
Able to explain pros and cons for 2 approaches. Discussion around performance and memory
Was asked to implement without using STL
After coding, I was asked to review it as a 3rd person. Reviewed and provided good comments
There was one bug which I could figure out after getting a hint.


Round 3: 

Coding, Behavioral
3 leetcode easy but tricky questions
Explained approach for 2 questions and was not required to code them
Was asked to code 3rd question and after coding my approach I improved it further with a hint
A few behavioral questions

 

Round 4:  

Behavioral, Design
Design a small web service for tracking some stats
behavioral questions around my past experience
 

Round 5:

Hiring Manager - Behavioral, Design
Design a rate limiter with a few requirements
Lot of behavioral questions around how i handle teams and projects, how i deal with my manager and team members
 

The design questions are based on server systems and my whole experience is on the client side.

But overall they are happy and probably based on the feedback from round4 and 5 they offered me L64 and I was somewhat happy but was expecting L65. 

 

** I GOT THE OFFER LETTER.

 

by Expert (4,460 points)
0 like 0 dislike

Microsoft | L60 | Redmond | February 2020 

 

Status: MS in CS

Position: L60 Software Engineer at Microsoft

Location: Redmond, WA

 

Online Assessment:

  1. Debug Question
  2. Coding Question (String Operations)
  3. Coding Question (Array Operations)

 

On-site rounds:

Round 1:

One Behavioral and Level Order on Tree and BFS on Graph
N-ary Tree Level Order Traversal
Second question: imaging the above input as Graph. i.e. two nodes will have the same child. so you should not visit it if you have already visited.

Round 2

One Behavioral and Linked List Reversal and Reverse in K Groups
Reverse in K Groups

Round 3: 

One Behavioral and Given Char array and list of delimiters, split the array using the delimiters

/*input:

char[] arr = {'a', 'b', 'c', '-', 'd', 'e', '/','a', ':', 'b', 'c','*', 'd', 'e'};

char[] delimiters = {'/', '*', ':', '-'}

 

output:

{"abc", "de", "a", "bc", "de"}

 

Interview: 

1.Implemented with Time Complexity: O(NK) and Space Complexity : O(1) (Excluding Space for Output list)

2. Optimized to Time Complexity: O(N) and Space Complexity: O(K) (Used HashSet)

 

N: Length of arr

K: Length of delimiters

*/

 

public List<String> splitCharArray(char[] arr, char[] delimiters){

  Set<Character> delims = new HashSet<>();

  for (char c : delimiters){

    set.add(c);

  }

  

  List<String> out = new ArrayList<>();

  

  StringBuilder sb = new StringBuilder();

  

  for (int i = 0; i<=arr.length; i++){

    if (i == arr.length || delims.contains(arr[i])){

      String temp = sb.toString();

      if(!temp.isEmpty()){

        out.add(temp);

      }

      sb.setLength(0);

      continue;

    }

    sb.append(arr[i]);

  }

  

  return out;

}

 

Round 4:

One Behavioral and Object Oriented Design, Design File System and coded mkdir(store the unix path using trie)
image

Behavioral: Microsoft Core Values

Throughout your day, you’ll be assessed on how you exhibit some of these Core Values, so

keep them in mind and take some time to think about how you might incorporate these into

your technical interview and behavioral questions:

Collaboration – How do you work with a team and drive for company-wide goals?

Drive for Results – How do you drive for the best possible solution or scenario?

Adaptability – How do you push through ambiguity and respond to changing

circumstances?

Influence for Impact – Are you able to communicate effectively and persuade others?

How have you influenced the outcome of a situation or influenced others to get to a

result?

Customer Focus – Microsoft aims to surprise and delight its customers. How do you

think from the customer’s perspective and keep them in mind in your solutions?

Result: SELECTED.

 

by Expert (4,460 points)
0 like 0 dislike

Microsoft | SWE | Hyderabad | Mar 2020 

 

Work Experience: 1 year, 9 months - Application Developer

Position: Software Engineer at Microsoft

Location: Hyderabad, India

 

Process of Applying :

I applied on the career website many times and some of my friends referred me as well. I was approached by a recruiter on LinkedIn and called for the interview process the next day. I did not get much time to prepare since I was told to appear the next day for the interview.

Interview Process:

Round 1: Data Structure & Algorithm based + Project Discussion (1 hour)

The round started with a brief introduction, hobbies and interests.

Q1 - Given two numbers represented by two linked lists, write a function that returns the sum list. The sum list is a linked list representation of the addition of two input numbers. It is not allowed to modify the lists. Also, not allowed to use explicit extra space (Hint: Use Recursion).

Example :

Input:

  First List: 5->6->3  // represents number 563

  Second List: 8->4->2 //  represents number 842

Output

  Resultant list: 1->4->0->5  // represents number 1405

 

 

Discussed my approach with the interviewer and when he was convinced with my approach, I was told to write prod-ready code.

Q2 - Given a string, find the length of the longest substring without repeating characters.

Example 1:

Input: "abcabcbb"

Output: 3 

Explanation: The answer is "abc", with the length of 3. 

 

Example 2:

Input: "bbbbb"

Output: 1

Explanation: The answer is "b", with the length of 1.

 

I told him the two pointer approach and wrote down the code. He was convinced of the solution.

Q3 - Discussion about the current work experience, technologies involved in the current project and a quick walkthrough of my resume.

 

Round 2: Data Structure & Algorithm based + Project Discussion (1 hour)

This round started with a deep discussion about my project. The interviewer went through my resume and checked my competitive programming profiles mentioned in the resume. He asked about the last contest that I gave on Codechef and discussed some stuff about competitive programming.

Q1 - Given the first 4 terms of a sequence - 1, 11, 21, 1211….

Find the nth term.

I told him the O(N) approach. I was told to write prod-ready code. He tested it for a few cases and in the end, he was satisfied with the solution.

Q2 - Given an array of strings, group anagrams together.

Example:

Input: ["eat", "tea", "tan", "ate", "nat", "bat"],

Output:

[

  ["ate","eat","tea"],

  ["nat","tan"],

  ["bat"]

]

 

It was a pretty straight forward question.

Q3 - Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in BST.

Example:

Input: The root of a Binary Search Tree like this:

              5

            /   \

           2     13

 

Output: The root of a Greater Tree like this:

             18

            /   \

          20     13

 

 

The answer was expected in a single pass with prod-ready code.

Round 3: Computer Science Fundamentals + Project Discussion (1 hour)

  • This round started with deep discussion about my intern project.I was asked to explain the project, the algorithms used in the project and improvements I can do in the project with the current tech skills I possess. The discussion went on for 15-20 minutes.
  • Question related to Computer Science Fundamentals :
    1.Operating System questions related to mutex-semaphore, deadlock, banker’s algorithm, Paging and Page Replacement Algorithms.
    2.ACID properties (DBMS).
    3.Then I was given a table and was asked to write SQL queries for specific conditions. Two such questions were asked.
  • Question related to Shortest Path Algorithm :
    I was given n cities and I needed to find out the shortest path of all cities from a particular city. And further, if the shortest path needed to be found out from all sources, what modifications can be done? Algorithms used in Maps App. (Dijkstra, Floyd-Warshall and A-star Search)
  • Discussion about the work and tech stack of the team for which I was being interviewed.

Round 4: Behavioral Questions  + Design Problem + Project Discussion (1 hour)

  • Again, my current project was discussed and questions were asked related to my current project to test my knowledge on load handling and design of the system. The discussion went on for 15-20 minutes.
  • Design Library Management System.
  • Behavioral Questions :
    Why Microsoft?
    Innovations you have done at your workplace apart from work?
    Handling conflicts between team members
    Reaction to poor feedback
    Deliverables for tomorrow but it requires time, handling situations like these.
    Handling failures and setbacks.
  • Discussion about Microsoft products.

Result : After 15-16 days of the last round, I got an email for selection.

**Pro-tips :

  1. The interviewers were very friendly. You should not be nervous and be confident.
  2. Adapt to follow up questions.
  3. Speak out your thoughts and logic. Start writing the code only after you have discussed the approach with the interviewer.
  4. Practice writing programs on paper so that it can work in one go in the interview.
  5. Go well prepared with the projects and skills you have mentioned in the resume.
  6. If you have strong programming profiles, do mention about it in the interview and your passion for competitive coding.
  7. If you are not able to solve any problem, you should not panic. Interviewers just want to check your approach to problem solving.
  8. Great Communication skills are always a plus point.
by Expert (4,460 points)
0 like 0 dislike

Microsoft | SDE2 | Seattle 

 

Interview Process.

Phone Screen:

Implement a Queue without using STL, in the most Object Oriented way.

 

Onsite Interviews

 

Round 1:

Given a function, what this function is trying to do, can you find some problem with this function, and how can you improve the performance of this function with whatever it is doing?
void copy(int n, unit8_t *input, unit8_t *output)

{

while(n--)

{

*output++ = *input++;

}

}

 

 

Round 2:

  • What keeps you motivated, Why you want to join Microsoft, How you like working in your current company, Explain an interesting problem that you solved recently.
  • Most beautiful Interview Question I have ever come across
    You are given an abstract machine that has a timer, which can be visualized as a 1 dimensional timeline gradually increasing. This machine has an abstract OS running on it, which can perform only 3 operations:
    1. CreateTask(time, task()) - Schedules a task() by setting a timer for a given time from current time (i.e relative to current time), and when the expected time is reached it triggers the task(). The OS is constrained in a way that it can schedule only 1 task() by using CreateTask. Until the scheduled task() is executed or explicitly canceled using EndTask, no other CreateTask will execute.
  • More explanation:
    Analogy of CreateTask function can be explained with an Alarm clock. Suppose you have a hypothetical Victorian Alarm Clock that can schedule only one alarm (by spinning a spring). You set the alarm time based on the input relative to current time, which means if now time is 10:00pm and you are asked to set an alarm 8 hrs from now, then your alarm should ring at 6:00am.
    1. ElapseTask() - this function returns the time elapsed since the last CreateTask was called. If the task which was scheduled by the CreateTask has already been executed, then ElapseTask will only return 0.
  • More Explanation:
    Taking the alarm clock analogy here, if an alarm clock was set at 10:00pm for 8hrs from that time, then calling ElapseTask at 12:00am will return 2, calling ElapseTask at 5:00am will return 7, but calling ElapseTask anytime after 6:00am will return 0.
    1. EndTask() - Cancels any scheduled task previously set by a CreateTask.
  • Problem statement: You have to use these 3 OS calls and design an API or a set of APIs that can schedule multiple tasks.

 

Round 3:

  • Given a NxM 2D grid. In some cells there are blockers (which no one can access), there are some cells which contain guard(G), and the rest of the cells are just empty. Now you need to find out what is the minimum Manhattan distance of each empty cell from the guard cells. In case of conflict, choose the distance which is minimum. https://leetcode.com/problems/01-matrix.

 

 

Round 4: [Non-technical]

  • Just a casual interview with the manager. I felt like I was driving the conversation for the most part, I was asking a lot of questions and very few questions were asked to me. As I retrospect now, I guess this was the part that I should have really convinced my interviewer that I'm the right person for this role. Overall, the interview went cold. Nothing was coming out of him.

**SELECTED.

 

by Expert (4,460 points)
0 like 0 dislike

Microsoft | L60 | Bangalore | Nov 21 

 Status:

 2.3+ years Exp

Position: L60 at Microsoft

Location: Bangalore, India

 

** I had applied through a referral 2-3 months back. But got a call from a recruiter mid October'21.

 

Interview process:

1.Online assessment

2. Virtual Onsite interviews

 

Online Assessment :

3 questions - 2 LC medium questions ( strings, DP based) and another question on LLD.

 

I got a call from the Microsoft recruiter after a week that I passed the OA.

 

Onsite interview (3 rounds):

All the 3 rounds were with different engineers from the same org/team. Last round was from the hiring manager. I chose C++ as my coding language as I was comfortable with it for DSA and used Java for the design round.

 

Round 1:- DSA Round 

 Brief introductions and straight to question.

 Stack & String based question. Further questions on complexity and optimisation. Interviewer seemed satisfied with my answer and code.

 

Round 2 :

Interviewer was a very senior engineer. We started off with discussing my background , previous work , tech stack, couple behavioral questions like most challenging project, etc.

I was given a very ambiguous single line description of the problem statement. It took me a good 10 mins to understand the needs of the system by asking multiple questions on requirements, etc. I had to come up with a LLD & surface-level HLD to design a microservice that would provide the same services as when we use one of the popular MS Desktop applications ( can't reveal due to NDA ).After the HLD and I described in detail the models required for LLD.

The interviewer was also keenly looking forward to the market/business suggestions that I was coming up impromptu during the brainstorming as well. It went slightly above an hour, but I think I fared well.

 

Round 3 :

 This was with the hiring manager. He asked about my background, skills and interests. We discussed in detail about one of my projects and a few behavioral questions.

Last few minutes I was given time to ask him questions.

 

** SELECTED.

 

by Expert (4,460 points)
0 like 0 dislike

Microsoft | Offer | SDE II | L62 | Hyderabad

Interview Process:- 

A recruiter contacted me on LinkedIn, and all the rounds happened on the same day.

Round 1:

 DS ALGO He started with a few questions on my past project and then the following

 1:- https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/

 I solved this iteratively then he asked me to do it recursively. I solved it without any hints.

 2:- A question with a variant of finding the contiguous subarray which has the largest sum: I solved it without any hints.

 

Round 2:

 LLD The question was to design an online system where a user can see the number of other online users. Follow up:  There are multiple data centers and a load balancer. I had to tell how the load balancer and other data centers would communicate.

 

Round 3: 

HLD He asked me to design a Facebook feed from scratch. I had to ask clarifying questions but it went well.

 

Round 4:

 Hiring Manager He explained about the team structure and what Microsoft is doing. He asked me about my past projects in detail and 1 behavioral question( Give me an example where you failed and that impacted the company). At last, he asked an easy design question( kind of LLD).

** SELECTED.

 

by Expert (4,460 points)
0 like 0 dislike

Microsoft | SDE2 | Hyderabad | Sep 2021 

 

Education: B.Tech in CSE tier 2

Years of Experience: 3+ Years

Prior Experience: MNC

Company: Microsoft

Title/Level: SDE 2 level (L61)

Location: Hyderabad

Offer Date: 09/2021

Compensation here

 

Round 1:

Codility test, Two questions, Robot walk and count anagrams.

 

Round 2:

F2F, 2 Questions, Minimum Window Substring and LCA for BST.

 

Round 3:

F2F, Design BookMyShow (API and DB design, concurrency), Asked to code LRU Cache, then asked the approach for LFU. Then asked about strategy design pattern.

 

Round 4:

Manager Round, Deep Dive into previous work experience, kubernetes, database and linux internals and then was asked to do HLD and LLD for an Authentication Service.

 

Round 5 :- HR Round

 

**Offered after 3 Days.Rejected the offer, Had competing offers, decided to go ahead with Meesho.


 

by Expert (4,460 points)
0 like 0 dislike

 

 

MICROSOFT INTERVIEW EXPERIENCE |  SDE-1 | SELECTED | OFF - CAMPUS | 2021 | FRESHERS

** I got this opportunity through the Microsoft engage program 2021.

Round1 ( Coding round on Codility ):-

There were two questions to be solved in 120 mins. Questions were medium-hard level.

  • This question was based on multi-source BFS. A graph was given and an array of hospitals, now for all non - hospital nodes, we need to find the max time an ambulance may take to reach them. ( medium-hard )
  • This question was based on Graph DFS + DP. Don't remember the question exactly, but it was to apply the inclusion-exclusion principle on graph nodes using DFS. ( hard )

I was able to solve both the questions and passed all the given test cases within 60 mins. It was mentioned that code would be judged after submission for hidden test cases as well.

Round 2 :- Interview Round (45 MINUTES)

  • Zero Subarray sum, earlier he asked for a bool value, then he asked me to return starting and ending indices of all such subarrays.
  • A binary tree is given, node value can be either 0 or 1. Now moving from root to a leaf forms a decimal number in binary representation. I was asked to find the sum of all such possible decimal numbers. All such possible numbers would be equal to the number of leaf nodes present in the binary tree.

I was able to solve the first one quickly, then the second one with some hints from the interviewer. I was asked to write code in my favorite editor and run the code for some test cases. The interviewer was satisfied at the end and he asked whether I had any questions for him. Within half an hour I received the call for my second round.

Round 3 :- Interview Round 2 ( 50 MINUTES)

  • Cutting a rod problem was asked, I explained the overlapping subproblems first and optimized using DP. I was asked to run the code and check for many test cases( including the edge cases ). The interviewer was satisfied with the code, then he said we have time so let's solve another question.
  • String question DP + Rabin Karp Hashing. Given a vector of strings, and a target string, find whether a subset of the array of strings could concatenate to the target string, if more than one possible way, return the one with minimum elements in the subset. I explained to him first how hashing would help in comparing then overlapping subproblems while making the target string. Then I was asked to write the code for the same.

The interviewer looked happy after I solved both the questions, So I was pretty sure that I would qualify for the next round.

Rond 4 :- Interview Round 3 

  • This round was conducted after 4 days of the previous two rounds. The interview began with my introduction, I was asked to brief about my internship and project experience. Then he asked me the potential problems that would occur if my project ( web dev ) was used by a million users. It took the direction of system design, we discussed how to decrease the latency time in detail.
  • Then after a 20 min discussion, he asked me a coding problem to code quickly. The problem was based on a string. A string is valid if all the characters have the same frequency or at most two different frequencies. Example - aabb is valid, aabbccdd is valid, aabbccd is also valid, but aabcddd is not valid. The question was pretty simple, but it took time for me to understand it. I wrote the code and then the interviewer asked me to run it on some test cases.

In the evening time on the same day, I got the mail that I have been selected. I was so happy and started celebrating.

Tips for coding round

  • Practice Graph-based questions and their variations. Try to write print/cout statements along with your code, this helps you to debug faster.
  • Try commenting on your code as well and with meaningful function names.
  • Make sure to check for edge cases ( very imp ).

Tips for interviews -

  • Listen to the question carefully and clarify the question first, before prompting for your solution.
  • If you are stuck, discuss what you know and where you are facing issues, this helps the interviewer to provide a directed hint.
  • After you discuss your approach, don't forget to explain the time and space complexities.
  • Be confident in your answers and think out loud.

I hope this helps !!

 

 

 

 

 

by Expert (4,460 points)
0 like 0 dislike

MICROSOFT INTERVIEW EXPERIENCE |  L60 | SELECTED| OFF - CAMPUS | MARCH 2021

**March 2021: I got a call from a recruiter through Linkedin. Interview was scheduled in 10 days.

Round 1: 

 It was an online test with 2 medium level questions. I am adding the link below.

https://leetcode.com/discuss/interview-question/1112027/oa-microsoft-march-2021

Had to score at least 50 percent, so I was able to clear this round.

 

Virtual Onsite rounds:

3 rounds were scheduled on the same day. Every round was an elimination round.

Round 2: 2 medium level leetcode questions

https://leetcode.com/problems/longest-palindromic-substring/solution/

Explained the different approaches and their tradeoffs and then wrote production ready code for the most optimal approach.

Another question was similar to how to merge different size files into 1 file with minimum cost, I solved it using the Priority queue after discussing different approaches.

Got a call from the recruiter after 10 mins, the feedback was positive.

Round 3: 

It was mostly a Problem solving/ Low Level design round. I was asked to design an In-Memory  file system. Here I was expected to define proper classes using SOLID and OOPS concepts, then asked to write some functions to retrieve files with different filters.

I was able to perform well in this round. I cleared this round as well.

Round 4:

 This was a High Level Design Round. I was given a choice to design any system, I chose Instagram then we discussed Instagram Live feature. Had a good discussion about scalability, how to handle load, how to retrieve followers etc, discussed trade offs of different approaches. I was expected to design different components present in the system. It felt like a discussion round, I enjoyed it.

I got a call from a recruiter that I cleared the round but the Hiring Manager round will happen the next day.

Round 5 : 

Hiring Manager Round: It started with a discussion on my resume and various projects I have done. Some behavioral questions. I was performing well so far, then a coding question was given to me.

https://leetcode.com/problems/basic-calculator-ii/

I was able to explain the right approach but it took some time and I got nervous and wasn't able to code properly. I felt blank and thought I blew up my chance. The interviewer asked why I am not able to code even after telling the right approach. I was disappointed with myself. I tried to act normal but I wasn't.

Feedback:

I didn't receive any feedback from my recruiter even after 2 weeks. I lost all hopes, sent them multiple mails but no answer. Then one day, I received mail from the HR that they have received positive feedback and they would like to go ahead.

Though I didn't like the way they Ghosted out and ignored my mails for 2 weeks. I decided to move ahead.

I finally received an offer after 1 month of completion of all rounds. The process has been really slow. I know these are hard time for us in India, it might have impacted the whole process.

I am happy that hard work finally paid off and I am going to accept the offer.

 

by Expert (4,460 points)
0 like 0 dislike

MICROSOFT INTERVIEW EXPERIENCE |  SDE | REJECTED | OFF - CAMPUS

Phone Screen: Project Overview and Count number of islands.

Virtual Onsite:

Round 1 : 

https://leetcode.com/problems/two-sum-iv-input-is-a-bst/

 I suggested these 2 solutions-

Solution 1. using map to track values and checking for complement while traversing tree, O(n) space

Solution 2 - Pick a node and search for target-node.val, O(1) space.

Interviewer asked to provide some other solution and then gave a hint that smallest and largest elements are known in BST and Node structure can be changed. I implemented a 2 pointer approach where each node has a link to the parent node and it can be used to identify previous/next value. Interviewer pointed out some bugs in the code which I fixed.

Round 2:

  Project Overview for 30 mins. Question – For a card based game, verify if given cards form a winning hand. Simple question but the rules of games were complicated. I clarified rules and started implementation. Midway in the implementation interviewer mentioned that the rules of the game are different from what I have understood Clarified and fixed it. Couldn’t find it on Leetcode.

Round 3:

  Some project overview. Question - Given some texts and indent level for each text, store it in a data structure. I suggested a map based approach. Interviewer suggested trying a tree type approach. I was stuck here as I was not sure what is required here. Interviewer gave more hints to clarify requirements which can be summarized as “Convert it to N-ary tree so that the DFS of the tree will give the correct order of text”. Implemented using stack.

 

Round 4: Hiring Manager. Project overview for 30 mins. 

 Question - LCA of a N-ary tree with some additional constraints. Suggested 2 approaches and implemented one. https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/

Overall interview was fun. All problems were easy to medium level. Challenging part was to clarify requirements, as the initial description of the problem was very vague in every round.

 

by Expert (4,460 points)
1 like 0 dislike

Microsoft | L61 | Bangalore | November 2021 | SELECTED

 

Status: 4yrs of Exp

Position: SDE2 at startup in india

Location: Bangalore

 

Team : Azure

The interview had following rounds

Technical phone screen (30 mins):

1 . Questions around leaving current company

2 .  Distributed systems designing.

 

First Round (1hr):

2 questions .

1. One easy one medium. Was able to code the first one easily.

2 . Required help in the second question. Due to time limitations I was only able to come up with a base condition in recursion.

 

Second Round (1hr):

1 . Serialize and deserialize a heterogeneous linked list

     Discussed multiple approaches and wrote code for one

2.  At the end a few questions on distributed systems.

 

Third Round (1hr):

1.  lld based open ended design problem .

2. Similar to the snapshot version in map . Have done the same problem on leetcode once.

3. Had a good discussion and was able to write good quality code with proper classes.

 

Fourth Round (Managerial 30 mins ):

1  . General stuff around work

2 .  Behavior questions.

 

Fifth Round(Interview with team manager):-

1.  This round was specifically asked by me to have a word with team manager

2. To understand the work and responsibilities I will be dealing with.

 

 

**At the end I had a good level offer

Base : 29 lakhs/yr

Joining Bonus : 8 lakhs

Performance Bonus : 20%

Stocks : 110k USD

Planning to join microsoft as they provide best perks , benefits , stocks are great.

 

by Expert (4,460 points)
1 like 0 dislike

MICROSOFT INTERVIEW EXPERIENCE |  SDE-1 | SELECTED | Seattle

Round 1 :- Phone Screen Round (60 Minutes).

  1. Questions were asked on Recursion.
  2.  Question related to Computer Network :- Concurrency explains multithreading.

 

ONSITE INTERVIEW:- 

Round 1 :- 60 MINUTES

1. Find a Celebrity. Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity. The definition of a celebrity is that all the other n - 1 people know him/her but he/she does not know any of them.

Now you want to find out who the celebrity is or verify that there is not one. The only thing you are allowed to do is to ask questions like: "Hi, A. Do you know B?" to get information of whether A knows B. You need to find out the celebrity (or verify there is not one) by asking as few questions as possible (in the asymptotic sense).

You are given a helper function bool knows(a, b) which tells you whether A knows B. Implement a function int findCelebrity(n). There will be exactly one celebrity if he/she is at the party. Return the celebrity's label if there is a celebrity in the party. If there is no celebrity, return -1.   

Follow Up: Given 10 people, how many questions would you ask? Can you reduce the number of questions?

https://leetcode.com/problems/find-the-celebrity/     (45 MINUTES).

2. Behavioral Questions round . Going over my resume  (15 MINUTES).

 

Round 2 :- 60 MINUTES

1. Given a set of candidate coins (without duplicates) and a change (target), find all unique combinations in coin denominations where the coins sums to target.

https://leetcode.com/problems/combination-sum/

The same repeated number may be chosen from candidates an unlimited number of times.

Follow Up: Consider if duplicate elements are also present in the array.

2. Behavioral Questions.

 

Round 3 :- 60 MINUTES

  1. Sort a linkedList given a reverse function. can only reverse one node at a time.
  2. Find the minimum element in an unsorted array. best possible time and space complexity.

 

**I would highly recommend solving Top Interview Questions from LeetCode as well as analyzing questions for possible follow ups .

I hope this helps everyone.

Thank You!

 

by Expert (4,460 points)
1 like 0 dislike

MICROSOFT INTERVIEW EXPERIENCE |  SDE-2 | SELECTED | MAY- 2021 |

Phone Screen Round :-

1. Find the nth element from the end of the linked list.
  Gave & implemented the optimal solution. Wrote unit tests for several cases with Mock Data.
2. Several follow ups on how we can optimize and other Dev ops questions with REST, Web API, HTTP Headers, Unit tests.

Virtual Onsite:

Round-1:

System Design of a Huge bank Statement for enterprise customers. Different tradeoffs if we have to download humongous data if for too many transactions.

Round-2:

Number of Distinct Islands, Combinations of Phone numbers.

Round-3:

Split Array to Disjoint Sets.. #915.

this one I bombed as I coldn't come up with optimal solution.

Round-4:

System Design of Search Engine and how do we calculate similarity scores of billions of Pages.

Very good experience and be prepared to answer a lot of follow ups.

 

by Expert (4,460 points)
1 like 0 dislike

Microsoft Interview Experience  | SDE2 (L62) | Bangalore | Jan 2022 | SELECTED

 

Applied through referral

Codility Assessment :

There were two questions related to DSA 

Both are of medium level Leetcode problems .

 

Round 1:

1:- Next Greater Element Problem 

2:-  LFU Cache Problem 

 

Round 2:

1. Decode String

2. Leetcode Medium Level Problem .

 

Round 3 LLD:

Design Notification System.

 

Round 4 (AA):

Behavioral question also project related question. Design memory management system.

 

**AFTER A WEEK RECEIVED THE OFFER.

 

by Expert (4,460 points)
1 like 0 dislike

MICROSOFT INTERVIEW EXPERIENCE |  SDE-1  | SELECTED | NOV 2021 | OFF-CAMPUS

Round 1 :-

 CV selection, 1 coding round, 3 weeks mentorship program (similar to an internship), and based on your performance in the mentorship, there would be interview rounds (normal - 3 Technical rounds). All rounds (including interviews) were conducted on the Codility platform.

 

Coding Round (90 minutes): 

Two questions were there ranging between medium-hard types

1. Almost similar to the "Session in BSU" (Educational CodeForces Round 49).

2. Given N points (can be collinear) in the 2D plane. We are required to find 3 points such that the triangle formed by choosing these 3 points should not contain any other points inside the triangle.

Concept: You have to find the 3 closest points. Consider any point as a 1st point, then find the 2nd one which is closest to it using the DISTANCE FORMULA. Now you have 2 points, find the 3rd one which is closest to both of them (using the same concept), and also keep in mind that points should not be collinear (you can easily do this by checking that the slope of points 1 and 3 should not be equal to the slope of points 2 and 3).

 

Technical Round 1:- 60 MIN.

1.Find the cousins in a binary tree: https://leetcode.com/problems/cousins-in-binary-tree/

2. The concept was same: https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/

 

Technical Round 2:-  60 MIN

1.Find the next permutation: https://leetcode.com/problems/next-permutation/

2.Find words in the matrix (for harder version, use Trie):
Word Search 1: https://leetcode.com/problems/word-search/
Word Search 2: https://leetcode.com/problems/word-search-ii/

 

Technical Round 3:- 45 minutes for the project and rest for the coding problem(TOTAL 60 MIN)

Detailed discussion on any one of the projects: Stacks and techs used, why you made this app, the problem faced, how did you manage to make your app efficient, database structure and schemas, functional and non-functional requirements, security, scalability, etc.

Problem very similar to this one: https://leetcode.com/problems/maximum-equal-frequency/

** Even if you are not able to write the complete and working code, show your approach. They tell you to write the code to see if you are able to write what you think.

Be positive and aloud during interviews. Don't be nervous and in a rush to answer the question. Take your time. Interviewers will help you whenever you get stuck. Believe in yourself and always in God.

 

by Expert (4,460 points)
1 like 0 dislike

 

MICROSOFT INTERVIEW EXPERIENCE SDE-II  || SELECTED || FEB 2022

 

Total Number of Rounds - 5

Round 1 -  Online Codility

2 Questions (1 on Array & 1 on Binary Tree)

Both were Medium Level Questions.

 

Round 2 - DSA Coding

1 :- A list of songs is present and we need to generate a random function , such that a random song should be played each time.

Extension to this - A song which is placed at the first turn should now repeat after at least K turns. After K turns, the probability of playing this song should be equally distributed.

2 :-N-Ary Tree is present and Root Node has K chocolates which it needs to divide among it's children equally . This distribution will continue till leaf Nodes. We have to print the count of chocolates with each Node after overall division.

 

Round 3 - HLD

Design Nearby App.

Main Focus was on how users will be shown nearby restaurants/clinic/salons etc whenever he opens an app.

 

Round 4 - DSA, Coding and LLD

1 :- Find out frequency of each element in Array in O(n) time complexity and O(1) space complexity

Numbers in array are from 1<= v [ i ] <= n

2 :- Design LRU Cache after detailed discussion on Cache , their usage, Architecture etc.

 

Round 5 - Cultural Fit with Sr. Engineering Lead

** Practiced GFG and Leetcode non-stop for 2-3 Months (Kind of Revision)

** SELECTED 

 

by Expert (4,460 points)
1 like 0 dislike

I got a call from a recruiter through Linkedin. Interview was scheduled in 10 days.

Round 1:

 It was an online test with 2 medium level questions. I am adding the link below.

   https://leetcode.com/discuss/interview-question/1112027/oa-microsoft-march-2021

 Had to score at least 50 percent, so I was able to clear this round.

 

Virtual Onsite rounds:

3 rounds were scheduled on the same day. Every round was an elimination round.

 

Round 2: 

2 medium level leetcode questions.

https://leetcode.com/problems/longest-palindromic-substring/solution/

Explained the different approaches and their tradeoffs and then wrote production ready code for the most optimal approach.

Another question was similar to how to merge different size files into 1 file with minimum cost, I solved it using Priority queue after discussing different approaches.

Got a call from the recruiter after 10 mins, the feedback was positive.

Round 3:
It was mostly a Problem solving/ Low Level design round. I was asked to design an In-Memory file system. Here I was expected to define proper classes using SOLID and OOPS concepts, then asked to write some functions to retrieve files with different filters.

I was able to perform well in this round. I cleared this round as well.

Round 4: 

This was a High Level Design Round. I was given a choice to design any system, I chose Instagram then we discussed Instagram Live feature. Had a good discussion about scalability, how to handle load, how to retrieve followers etc, discussed trade offs of different approaches. I was expected to design different components present in the system. It felt like a discussion round, I enjoyed it.

I got a call from a recruiter that I cleared the round but the Hiring Manager round will happen the next day.

Round 5 : 

Hiring Manager Round: It started with a discussion on my resume and various projects I have done. Some behavioral questions. I was performing well so far, then a coding question was given to me.

https://leetcode.com/problems/basic-calculator-ii/

I was able to explain the right approach but it took some time and I got nervous and wasn't able to code properly. I felt blank and thought I blew up my chance. The interviewer asked why I am not able to code even after telling the right approach. I was disappointed with myself. I tried to act normal but I wasn't.

The interview ended on a neutral node and I knew I would be rejected.

Feedback:

I didn't receive any feedback from my recruiter even after 2 weeks. I lost all hopes, sent them multiple mails but no answer. Then one day, I received mail from the HR that they have received positive feedback and they would like to go ahead.

 

** I finally received an offer after 1 month of completion of all rounds. The process has been really slow. I know these are hard time for us in India, it might have impacted the whole process.

I am happy that hard work finally paid off and I am going to accept the offer.

 

by Expert (4,460 points)
1 like 0 dislike

I received interview call from Microsoft (Bangalore) for CRM team, SDE1 position for 1.5 year experience.

Round 1: 1 hour

It was a GD like interview, with multiple people in same room given same question and interviewer was discussing individually with every person.
Given 2 arays if integers, sort the first array based on order of 2nd array.
<https://www.geeksforgeeks.org/sort-array-according-order-defined-another-array/>
I started with brute force approach, then optimized to binary seacrh and then hashmap

Round 2: 1 hour

Same as previous round, one interviewer, multiple candidates same question individual discussion.

If you have a stream of incoming characters, reverse and print the string as soon as input is finished. Write a code for same

Round 3: F2F 1 hour

One-on-one

Flatten a multi-level linked list
<https://www.geeksforgeeks.org/flatten-a-linked-list-with-next-and-child-pointers/>

Took a while to solve this one.
First I used a stack and then formed an algo without stack an without recursion.

Round 4: F2F 1.5 hour

A printed sheet of a c-program was given, had to find syntactical and logical error in program.

Connect all nodes of a binary tree which are at same level.
You can not store level information
<https://www.geeksforgeeks.org/connect-nodes-at-same-level/>
<I used a variation of level order traversal>

Round 5: Hiring Manager <1 hour

Detailed discussion on current work, was grilled a lot

Reasons to leave current company

Reasons to join Microsoft

and other such questions

Tips:

Keep thinking loud and discussing your thought process with interviewer. They will keep giving hints for you to reach solution.
Find a solution, any solution, and keep optimizing it.

Hope this helps. 

by Expert (107,890 points)
1 like 0 dislike

Microsoft Interview Experience for SDE-1 (Off-Campus)

 25 Feb, 2022

Round 1 (Online Assessment Round) – 2 coding questions had to be solved within 90 minutes. The platform for the test was codility. Remember that in the codility platform system’s test cases are hidden. You can test the code against your test cases.

  • There are N points given (numbered from 0 to N-1) on one plan. The point kth is at the coordinates (X[k], Y[k]), and the tag of the point is S[k]. We want to make a circle with a center at (0,0). The circle should not have two points with the same tag. What is the maximum number of possible points within the circle?
  • Given a tree having N nodes, numbered from 0 to N-1. Each node can contain only one of the letters ‘a’ or ‘b’. An array A of length N is used to represent the tree. A[k] (for K from 0 to N-1) represents the parent of the kth node. Letters are represented as a string S[k]. You need to find the number of vertices on the longest path in the tree, such that no pair of adjacent vertices on the path would contain the same letter.

Fortunately, I could run both the codes. After a couple of days, I received a mail that I got selected for further interview rounds.

Interview Process: There were 3 interviews in total.

Interview Round 1 (Technical Interview): She introduced herself and asked me to introduce myself. Then she directly shifted to the data structures. She asked me two questions-

  1. Given a tree (which has left, right, and previous pointers), you need to populate each previous pointer to point to its previous left node. If there is no previous left node, the previous pointer should be set to NULL.
  2. Spiral print of a matrix.

In the end, she asked me if I had any questions. I asked her to share her experience and the team she is currently working with.

After a week, I got a call that I got shortlisted for the next round.

Interview Round 2 (Technical Interview): He introduced himself. Then, he asked me some questions about my project (around 5-10 minutes). 

He then asked me if I was comfortable in solving questions on multi-threading. I told him that I had not learned multi-threading as a subject. So, he moved on to questions about data structures:

  • Print all the possible permutations of a string. Then he asked me to modify my code so that there were no duplicates.
  • To print all the subsequences of a string.

Since we had some time left, he asked another question. It was a scheduling question. He only wanted to know which data structure would fit best in the situation. I told priority queue, and he seemed satisfied. I don’t remember the exact question.

Luckily, I got selected for the next and the last round.

Interview Round 3 (Final AA Round): AA stands for “as appropriate”. This round was a mix of technical and managerial questions.

He started the interview with questions regarding definitions of time complexity and space complexity. 

  • What is the best time complexity?
  • What is the best space complexity?

He then gave me a coding question. 

  • There are n gas stations along a circular route, where the amount of gas at the ith station is gas[i]. It costs cost[i] of gas to travel from the station to its next (i + 1) station. Given two integer arrays of gas and cost, return the starting gas station’s index if you can travel around the circuit once in the clockwise direction with enough gas, otherwise, return -1. He wanted an O(n) approach.
  • He then asked me some questions about my projects, like why MongoDB? Advantages of it.
  • He went on to ask about any product like Alexa, Google Home, etc. that I like. I said Google Home. Then he asked questions like how it knows what action to perform taking input as voice.
  • Why Microsoft?

My interview ended 15 minutes earlier.

Final Verdict: After a week, I received a mail that I got selected for the full-time software engineer position.

Suggestions:

  • Communicate well with the interviewer.
  • Be honest. If you’re not good at any topic, be very clear in the first place.
  • Show willingness to the interviewer about the opportunity.
  • Keep coding.
by Expert (107,890 points)
1 like 0 dislike

Microsoft Interview Experience | Internship  | ON Campus | SELECTED

 

All the rounds were completely virtual and interviews were held at Microsoft Teams except for round 1 which took place at mettl.com. I was also asked to share my screen to write code for the questions in rounds 2,3 and 4.

 

Round 1: 

 

This round had 3 simple questions. The questions were modifications of the below problems –

 

1.Check for URL in a String.

2.Given the second and third terms of a GP, Calculate the sum of first n terms of the GP and round the answer up to 3 decimal places.

3.Balanced Parenthesis.

This round was very easy so most of the students were able to solve all the 3 questions completely, but they also considered the time taken to solve and CGPA for shortlisting.

 

Round 2:- 

 

1.Left rotate and Right rotate an array by giving no positions.

 

2.Group all anagrams together. I told him that the question can be solved by inserting every string in a hash map such that the key-value used for anagrams is the same. so I told him that the key for any string should be the string after sorting because anagrams after sorting correspond to the same string.

The interviewer was very friendly and was constantly discussing.


 

Round 3:-

 

Firstly the interviewer asked me to introduce myself and asked me to describe briefly about my projects. Then he gave me a question related to OS. The statement was – “Given 2 different Processes which can’t interact with each other describe how these 2 processes can share data from one another”. I tried to explain to him using a shared memory concept, but he was not satisfied, and he asked me a different question.



 

How would you sort 1 GB integers stored in a text file when memory has the capacity to store only 200MB data?

I explained to him the external merge sort approach to solve it and also wrote code for it. Since I was not comfortable in dealing with memory, I asked him If I can transform the problem statement to – sorting n (large no of integers) when you can load only k integers in memory (where k is much lesser than n). He also co-operated and let me transform the problem statement.

 

Then, he asked me to explain the Time complexity of the solution stepwise. After that, he asked me whether I had some questions for him or not. so I asked him to brief me about the type of projects that interns work on in Microsoft.

 

Round 4:-
 

 This round began with my introduction and shortly after that the interviewer asked me a coding question. The question was:

 

You have flight details of n flights and each flight detail contains source, destination, start time, and end time. He asked to find no airplane required by the airlines so that every flight can be covered.

He didn’t want me to code it but I had to explain to him the approach and which Data structure should be used. The purpose of the question was to test if I was able to visualize the solution using a graph network. I gave him a DFS based solution. Then he asked me basic questions like what is operator overloading, run-time polymorphism, and internal fragmentation.

 

**Selected for the internship.

 

Tips: Just stay calm and confident. If you are unable to think of an optimized solution start with brute force and ask for hints. In most of the interviews, the interviewer is always ready to help, and he also tries to build a solution with you. Don’t Panic and believe in yourself!!

 

by Expert (4,460 points)
1 like 0 dislike

Microsoft Interview Experience | Internship  | OFF Campus | SELECTED

 

Round 1 :-  ONLINE ROUND 90 mins

 This round was open to students from all the Institutes across India.This round had 3 coding questions.Coding questions were very straightforward and were mostly implemented based on little logic required.

1. Given a JSON string, find the max depth of the string.

Example “a:{b:{a:‘z’, b:‘y’}, c:{z:[2,3]}}”.

Here the max depth is 3.

I was able to solve and submit all 3 questions within 15 or 20 mins.

** After a month or, so I got a call for an Online Interview.

 

Round 2 :- 45 Minutes. 

This round focused on Data Structures, Algorithms, and Implementation.Only one question was asked in this round.

Problem: Implement a DS that supports 3 operations.

 Insert

 Delete

 Get Random Element (Return a uniformly random element from the set of elements)

It is guaranteed that the elements are unique.I was asked to implement DS that supports all these operations in O(1) time.

After 15 mins or so I was able to come up with an optimal solution and was able to implement the same within 20 mins.

After a week I received an email for an Onsite Interview.

 

Round 3 :- Technical Round 

 

This round was majorly focused on System Design but 2 DSA questions were also asked.

Question 1 Given a matrix find a submatrix with the maximum sum.

The naive solution takes O(n ^ 4) time.

This is a standard DP question and can be solved in O(n ^ 3) time using the 2D Kadane Algorithm.

I gave both solutions.

Question 2 Given a row-wise and column-wise sorted matrix, find a given element.

The naive solution takes O(n ^ 2) time.

Can be solved in O(n * log n) time by applying binary search in every row or column.

Can also be solved in O(n) time by starting the search from the top right element.

I gave all 3 solutions.

Both questions were asked in the first 15 minutes of the interview and the rest of the Interview was focused on System Design.

Question 3 Design a Restaurant Management System.

 

Round 4 :- Technical + HR 

 

During this round, Interviewer asked questions related to my resume and my projects.

Question 1 Tell me about yourself.

Question 2 Given two very big numbers (each more than 500 digits), multiply them.

Question 3 In one of my Internships I had created a website (along with one friend), So he asked me to explain my entire process of website development from requirement gathering till deployment.

Similar questions were asked regarding my other projects.

I have done an Internship in my summer vacation of the second year at Samsung R&D Bangalore, So Interviewer asked me whether Samsung offered me an Internship this year and also asked me about my experience there.

The Last Question Three Qualities why we should hire you?

It is a standard question and I gave the answer that I read online.

 

**I was selected for the Summer 2020 Internship, and also received a PPO at the end of my Internship.



 

by Expert (4,460 points)
1 like 0 dislike

Microsoft Interview Experience | SDE-1  | On Campus | SELECTED

Round 1 :- Online Coding Test

   Three  coding problems were asked based on DSA .

 1 . Distinct Strings With Odd and Even Swapping Allowed.

 2. Check If One String Is A Rotation Of Another String.

 3. Buses -  You are given a vector of 'N' integers denoting the number of buses that can be boarded from the i-th position. The bus stops only at stops whose number is a multiple of the bus stop number from which the bus originates. You need to find the number of buses originating from each bus stop from 1 to 'N'.

 

Round 2 :- Technical Round 1  ( 45 minutes)

  Two  problems were asked .

 1. Longest Mountain Subarray

   You are given an array of 'N' integers denoting the heights of the mountains. You need to find the length of the longest subarray which has the shape of a mountain.

2. Other problems were based on OS subjects .

   What is a process?

   What is a program?

   Difference between a program and a process.

   What is a thread?

   What are the different states in a process life cycle?

 

Round 3 :- Technical Round 2 ( 60 minutes)

1. Kth largest element in the unsorted array.

2. OS Questions

 What are semaphores?

 What are the different types of semaphores?

 What is a mutex?

 What is a deadlock and how to handle it?

 

3. OOPS Questions

 What is an abstract method?

 What is polymorphism?

 What is encapsulation?

4. The interview discussed the tech skills and projects mentioned in my resume. Since I had recently started one NLP based project, the interviewer asked me about a challenge that I might face in that domain and how I am planning to overcome it. I thought for a while and gave a simple answer which I could think of at that time.

 Explain the internal working of HashMaps in Java.What is the importance of hashcode function?

How does Java work internally (JVM and its use)

How is Java different from Python?

 

Round 4 :- Technical Round 3 (60 Minutes)

 Three problems were asked .

1. BST to sorted DLL

 You are provided with a Binary Search Tree (BST), all you have to do is to convert it into the sorted doubly linked list (DLL).

 

2. Data Structure Supporting Insert Delete And GetRandom

Design and implement a data structure which supports the following operations:

insert(X): Inserts an element X in the data structure and returns true if the element was not present, and false otherwise.

remove(X): Removes the element X from the data structure, if present. Returns true if the element was present and false otherwise.

search(X): Search the element X in the data structure. Returns true if the element was present and false otherwise.

getRandom(): Return a random element present in the data structure.

 

3. Asked General Questions .

 

by Expert (4,460 points)
1 like 0 dislike

Microsoft Interview Experience | Internship | On Campus | SELECTED

 

Total Rounds = 4 (Online Test + 2 Technical Rounds + 1 HR Round).

 

Round 1 :- Online Test 

It was conducted on mettl and we had 90 minutes to solve 3 questions. Questions were shuffled for everyone but were fairly easy.

 

1. Given a string we need to return a string in which each character should be increased by 3 units. Eg.

       adz -> dgc

The a becomes d, d becomes g and z becomes c. The only trick here was that we just had to complete the given function and they passed the string as a character pointer and so you need to see how to traverse a string represented as a character pointer.

 

2. Convert an infix expression to a postfix expression.

 

3. Given a string in the form of num1+num2=num3 in which one of them is X we need to find the value of X. Eg.

  Input : 5+X=7 

  Output: X= 2

  Input : 7+2=X

  Output: X=9

So this was basically an implementation based question and we just needed to find out which one of them was X and accordingly find the answer.

 

**48 students were selected for the interviews.

 

Round 2 :- Technical Round 1 

 I was asked 3 questions in this round. The questions were pretty easy.

 

1. Find the max and min element at any point in a stack. I was asked to code it. I tried to keep the interview interactive by telling him my approach as I wrote the code. I was asked to do a few dry runs, and he seemed satisfied with my approach.

 

2. Reverse a string. We discussed the stack question for about 20 minutes and I told him I will use a stack to reverse it, and he didn’t ask me to optimize it.

 

3. Mirror a given Binary Tree. I first told him my approach that we will use post-order traversal and then he asked me to code it.

 

I answered all the questions, so I was pretty confident that I will be selected for the next round.

 

Round 3 :- Technical Round 2 

1.Find the diameter of a tree (No. of nodes on the longest path in a tree).

   I had seen this question before and knew the solution so I just told him my approach and we    did a few dry runs on sample inputs before proceeding to the next question.

 

2. Given a number N we need to convert N to 1 by performing a minimum number of operations.         The allowed operations are:

 Subtract 1 from a number.

 Divide the number by 2.

 Divide the number by 3.

 Eg.

 

 Input: 10 

 Output: 3

 10->9->3->1

 So at first, I was trying to generalize the solution by taking different cases. The interviewer  asked me to change my approach and I thought of a Dynamic Programming approach. 

 

#include <iostream>

using namespace std;

  

int main()

{

    int n = 10;

      

    int dp[n + 1];

    dp[1] = 0;

    dp[2] = 1;

    dp[3] = 1;

    for(int i = 4; i <= n; i++)

    {

        dp[i] = dp[i - 1] + 1;

        if(i % 2 == 0) dp[i] = min(dp[i], 1 + dp[i / 2]);

        if(i % 3 == 0) dp[i] = min(dp[i], 1 + dp[i / 3]);

    }

    cout<<dp[n]<<endl;

}

Output:

3


 

Round 4 :- HR Round 

It started with questions like tell me about yourself. I was prepared for this question and I kept the focus on my coding skills. For me, it was a mix of HR and technical rounds. 

 

So, he asked me questions on the Doubly Linked List. Given a pointer to a random node of a doubly linked list. Delete the node.

 

We discussed all the edge cases involved, and he just asked me to code it mentally and tell him each line. He seemed satisfied. Then he asked me why I wanted to work at Microsoft.  It was followed by questions on OOPS and Hashing.

 

He asked me what was the implementation of hashing in real life and how hashing is implemented internally. I was able to answer this but I didn’t know the technical terms. Finally, he asked me if I had any questions for him. Never give a no as an answer to this question as it shows that you are not interested in knowing about the company.

 

by Expert (4,460 points)
1 like 0 dislike

Microsoft  | Summer  Internship | ON CAMPUS

 

Round 1 :- Coding Round . 

This round was held on mettl.com There were three questions in a set and different sets for each student.

  1. Problem 1 -  Given the coefficient of a quadratic equation, find the root of the quadratic equation and return the value with at most three precision. Like if answer is 3.0 then return 3.0 itself but if answer is 3.1249 theen return 3.125. Easy question, find discriminant and apply formula.
  2. Problem 2 - Given two lists of 1’s and 0’s. If the first element of both lists is the same then remove it from both lists. If Different than in the first list, pop the first element and append it at last. How many numbers will be left on the list ? This question can be done using stack and queue.

They shortlisted 27 students for a Group Fly Round.

 

Round 2 (Group Fly) Round :- 

  1. Problem 1 :- Find whether the number is lucky or not. 
  2. Problem 2 :- Find whether the tree is binary or not.

We were supposed to write complete code on Paper

 

 Round 3 : Technical Round 1 

First of all, the interviewer asked me about my projects related questions for about 10 minutes.

  1. Problem 1 :- Given a string, find whether it is a valid parentheses. First I gave an approach using a stack then the interviewer asked me to optimize space complexity.
  2. Problem 2 :- I was given two linked lists and multiplied them and stored them in the third linked list. You can only use the new space for the third list and O(1) extra.

 

Round 4 :- Technical Round 2 

1. First question was about connecting nodes at the same level.

2. Given a linked list and an integer m. I need to rotate each m node of the link list. For example if my linked list is 1–>2–>3–>4–>5–>6–>7–>8–>9–>10–>11–>12–>13–>14 and m is 4 then return 4–>3–>2–>1–>8–>7–>6–>5–>12–>11–>10–>9–>14–>13. 

Constraints: Time Complexity O(n). Space Complexity O(1). Node value can not be changed.

 

Round 4:- Technical Round 3

1.There is a single core CPU and this code is running 

     “int main(){

       while(1);

      return 0;

      }” (infinite loop) and if we try to open the notepad will it open ? Give reasons. I explained Round Robin scheduling.

2. Given a maze, define an appropriate data structure to store it. Solve the maze and print the path. I was told to make some assumptions if needed. I assumed a square maze and stored it using two maps. To solve this problem I used a backtracking approach. Then he asked me to write pseudo code.

 

Status : - Selected

by Expert (4,460 points)
1 like 0 dislike

Microsoft  |  Internship | OFF CAMPUS

Microsoft conducted an all India drive for hiring SDE Interns(Minimum CGPA was 7 and no backlogs were allowed). They conducted a coding round in which people who solved 3 got a call or people who solved 2 and had a higher CGPA(+9) also received a call. Girls solving one problem were called for an on site interview.

 

Round 1 :- Coding Round.

  1. Problem 1 - Distribute N candies among K people
  2. Problem 2 - Minimum steps required to convert X to Y where a binary matrix represents the possible conversions.
  3. Problem 3 - Minimum number of sets with numbers less than Y.

 

Round 2 :- 60 min.

  1. Problem 1 -  Find the Lowest Common Ancestor in a Binary Tree.
  2. Problem 2 - Given a matrix, find and print the maximum path sum from 0, 0 to n-1, m-1.

** People solving both the problems and girls solving the first one completely and printing the maximum path sum for the second were taken to the next round. There would be 25 people who made it.

 

Round 3 :- 

It was a personal interview which was taken by two interviewers. They were really nice and gave me a lot of time to discuss. We had a long discussion on the ML projects that I did. They asked me about the algorithms used and the libraries and the functions in depth. They also asked me how I could do the same without functions and other stuff. It went for around 30 minutes. 

The next 15 minutes had a problem discussion in which I was asked to find the K-th largest element in the array. I gave a solution using set since they initially said that it contained unique elements, as soon as they said it has duplicate elements, I switched to priority queue. They later asked me to implement set or priority queue, which I was unable to do. 

After lunch, they informed me that I made it to the third round. Around 10 made it to the next round.

 

Round 4 :- 

The interviewer was of young age and seemed to be nice from the beginning. He asked me initially on my low semester marks, and they gave me an option to choose from DSA or Software Engineering or Architecture, on which I choose DSA. 

He gave me 3 questions during this course which I solved successfully.

1.   Find the minimum element in a rotated sorted array. I solved and coded the same using  binary search, he just asked me to add a case for n==0 which I missed.

2. Sort an array of 0’s and 1’s without sorting and minimum number of lines of code.

3. Detect a loop in the linked list. He just asked the approach and asked me to not write the code.

After that he asked me whether I would be able to answer real life problems using DSA. Then he asked me to implement a dictionary, on which I gave a trie solution, he was impressed with the answer, and asked me about search engine optimizations and DSA application on the search engines while predicting texts in the search box. We had a light chat after this for 2 to 3 minutes, in which he seemed to be impressed.

 

After an hour, they took our CV and selected 4 out of the 10 who were there. I went personally to the recruiter over there to know the reason for the rejection. He asked my name and after cross checking, mentioned that, since everyone was good, they were left with nothing but to choose on CGPA. I sadly had a low CGPA of 7.33 which turned out to be a curse.

 

Status :- Rejected

by Expert (4,460 points)
1 like 0 dislike

Microsoft | ML Internship | ON CAMPUS

30 Jun, 2021

 

Round 1 (Written) :-

62 mq questions in 1 hour. The level of paper was tough. 

Only 7 were shortlisted. The questions were based on Machine learning Algorithms, probability and counting, and statistics. It was conducted on Mettl. If you are able to solve 50% of the problem, then you can expect a call.

 

Round 2 (Technical Interview) :

Focus : Problem solving skills 

Problem 1 :- Based on Trees.

 I was given an input and a binary tree. My task is to delete all leaf nodes whose data is equal to the given input (wait it’s not that simple, you need to implement cascade delete in this question). I told him the approach and it was correct. Then he told me to write the code for it. I tried and reached very close to the result but missed one condition.

Problem 2 :- Few Questions were asked on neural networks, sentimental analysis. He gave me a problem about how to classify flight booking emails from other mails. I gave several ideas and approaches. It was an open-ended question so it totally depends on the interviewer whether he likes your idea or not. 

After this round 1 was over. It lasts for 50 minutes..

 

Round 3 (Face to face interview) :

Focus : Projects and Domain knowledge

He  told me to introduce myself. Then he quickly jumped to my projects section and asked every project one by one in depth. He asked several questions on Neural Network, CNN, Bagging Boosting, decision trees, activation layers. How to prevent overfitting, Regularization etc. How to mix more than one ML Algorithms. How to think, which algo should we apply in any particular scenario. That’s all about the second round. It lasts for 45 min.

 

Status :- REJECTED.

by Expert (4,460 points)
1 like 0 dislike

Microsoft | 2021 |  OFF CAMPUS.

Difficulty Level : Medium  

STATUS: Final Year [2021], B.E. Computer Science and Engineering, Tier-3

 

Timeline [Application -> Interview] 

  1. Applied via Microsoft Careers Portal. (No referral, all credit to ATS-friendly resume design and talent acquisition department).
  2. Received online test link on April 2, 2021
  3. Received Interview Invitation on April 6, 2021.
  4. Interview Communication mentioned 2 technical rounds and 1 AA discussion. Each round is an elimination round and AA discussion happens only if the first two go well.
  5. Completed First round at noon (April 8, 2021). Received an update the same afternoon that they will be jumping to the final round (AA discussion).
  6. AA discussion, initially scheduled for April 9, got rescheduled to April 10 due to the unavailability of the interviewer.

Waiting to hear back!

 

Online Test:- 

90 mins test with 3 questions. 2 easy, 1 medium-hard (got stuck with this one).

  1. First two related to strings and pattern matching (solved).
  2. 3rd related to puzzle solving. [hint: Goat, Grass, Lion] (tried but TLE)

Round 1

The interviewer had some trouble with his system. He informed me humbly. Started after 20 mins.

He introduced himself. Asked me about myself and my work (as it was mentioned in my resume)

Asked to mention any challenges I faced while working on my project.

Shared Link to codility and shared the first question.

Question 1 – Again related to string, anagrams. Discussed optimizing and adding conditions to test the code.

Question 2 – Related to arrays, I used an approach similar to the priority queue approach in this question to solve it.

Was asked to code both the solutions.

Talked a bit more about my work, and then he asked if I had paid any attention to the security part of the website or actually implemented any. I explained what parts I had focused on and implemented on my website.

He repeated them and asked me to explain a specific term.

He asked if I have ever implemented authentication and if my website needs it. I said I had implemented it but only using built-in Django Auth Models.

After all that talk, he asked if I had any questions for him.

I asked, he explained. END

Round 2:- 

Received an Update later during noon that the team had decided to jump to the final round.

AA Discussion:- 

The interviewer introduced himself and asked me to tell a bit about myself.

Asked me to dwell more on information about my internship.

I hadn’t given him any details about the product we were building and started explaining my role. After I finished, he asked me to explain first what kind of problem I was solving there. So (I mocked myself first for not starting by explaining the product) and then explained in detail.

He then asked me “how can you make your website more troubleshooting?” This is the question I struggled most with. Somehow I was not getting what the interviewer meant by that question. I gave him a couple of answers, but they were not accurate.

I admitted that I was not able to understand what he was looking for, and he said, ‘we can move on from this.

After 20 mins of me struggling over the word troubleshooting he shared the codility link.

He shared the question verbally. It was related to the Binary Search Tree. Pretty Simple.

I discussed a few approaches, and he asked me to go ahead with the coding.

I coded the whole solution. Modular and Structured.

He asked me to run it. I got 3-4 errors. Silly mistakes like forgetting to pass variables in method calls. He didn’t seem to care as I got hold of them in a second.

He seemed satisfied and asked if I had any questions for him. I did.

He asked me about how I got into this interview loop i.e, the process I followed until this AA round.

Then he asked me about my university and how I compare as a student to other students at my university.

 

Feedback from Interviewer

After all this, he gave me some feedback and mentioned I had very good coding skills. He appreciated that the code was structured and modular.

He pointed out that he asked me an ambiguous question (about troubleshooting) just to see how I handle it and I got a little agitated at the point when I was unable to answer it.

He suggested that I should be more calm and open in situations like this.

I agreed and said something in acknowledgment. He continued and said that the company looks for candidates who can handle ambiguous situations but at the same time they also look for people who don’t give up easily which he said was reflected by later part of our conversation, (conversation about my university projects).

We summed up.

 

Result :- Selected 

 

Some Points To Remember :- 

Don’t stress yourself if your interviews get rescheduled or your interviewers join late for the meeting. These interviewers are generally seniors whose schedules remain rather busy.

Hope this helps. All the best!

by Expert (4,460 points)
1 like 0 dislike

Microsoft | 2021 | Off-CAMPUS | Microsoft engage program

 

Round1 ( Coding Round on Codility ):

There were two questions to be solved in 120 mins. Questions were medium-hard level.

  1. This question was based on multi-source BFS. A graph was given and an array of hospitals, now for all non – hospital nodes, we need to find the max time an ambulance may take to reach them. ( medium-hard )
  2. This question was based on Graph DFS + DP. Don’t remember the question exactly, but it was to apply the inclusion-exclusion principle on graph nodes using DFS. ( hard )

I was able to solve both the questions and passed all the given test cases within 60 mins. It was mentioned that code would be judged after submission for hidden test cases as well.

 

Round 2 ( Interview Round 1 on Teams ):

This round lasted for about 45 mins. I was asked 2 coding problems.

  1. Zero Subarray sum, earlier he asked for a bool value, then he asked me to return starting and ending indices of all such subarrays.
  2. When a binary tree is given, the node value can be either 0 or 1. Now moving from root to a leaf forms a decimal number in binary representation. I was asked to find the sum of all such possible decimal numbers. All such possible numbers would be equal to the number of leaf nodes present in the binary tree.

I was able to solve the first one quickly, then the second one with some hints from the interviewer. I was asked to write code in my favorite editor and run the code for some test cases. The interviewer was satisfied at the end and he asked whether I had any questions for him. Within half an hour I received the call for my second round.

 

Round 3 ( Interview Round 2 on Teams ):

This round lasted for about 50 mins. I was asked 2 coding problems.

  1. Cutting a rod problem was asked, I explained the overlapping subproblems first and optimized them using DP. I was asked to run the code and check for many test cases( including the edge cases ). The interviewer was satisfied with the code, then he said we have time so let’s solve another question.
  2. String question DP + Rabin Karp Hashing. Given a vector of strings, and a target string, find whether a subset of the array of strings could concatenate to the target string, if more than one possible way, return the one with minimum elements in the subset. I explained to him first how hashing would help in comparing then overlapping subproblems while making the target string. Then I was asked to write the code for the same.

The interviewer looked happy after I solved both the questions, So I was pretty sure that I would qualify for the next round.

 

Round 4 ( Interview Round 3 on Teams ):

This round was conducted after 4 days of the previous two rounds.

The interview began with my introduction, I was asked to brief about my internship and project experience. Then he asked me the potential problems that would occur if my project ( web dev ) was used by millions of users. It took the direction of system design, we discussed how to decrease the latency time in detail.

Then after a 20 min discussion, he asked me a coding problem to code quickly. The problem was based on a string. A string is valid if all the characters have the same frequency or at most two different frequencies. Example – aabb is valid, aabbccdd is valid, aabbccdd is also valid, but aabcddd is not valid. The question was pretty simple, but it took time for me to understand it. I wrote the code and then the interviewer asked me to run it on some test cases.

 

 Result: In the evening on the same day, I got the mail that I have been selected. I was so happy and started celebrating.

 

Tips for Coding Round –

Practice Graph-based questions and their variations. Try to write print/cout statements along with your code, this helps you to debug faster.

Try commenting on your code as well and with meaningful function names.

Make sure to check for edge cases ( very imp ).

 

Tips for Interviews –

Listen to the question carefully and clarify the question first, before prompting for your solution.

If you are stuck, discuss what you know and where you are facing issues, this helps the interviewer to provide a direct hint.

After you discuss your approach, don’t forget to explain the time and space complexities.

Be confident in your answers and think out loud.

I hope this helps !!

by Expert (4,460 points)
1 like 0 dislike

Microsoft  | ONCAMPUS | Sept, 2020

 

Round 1 (Coding Round):

In this round, 3 coding questions were to be solved within a period of 90 minutes. It was held on the Mettl platform. This round was quite easy and I had completed it within 20 minutes.

  1. Given an integer, find the total number of set bits, first and the last set bit. 
  2. Given a string, find out the longest palindromic subsequence.
  3. Given an array of integers, find the number of inversions in the array. The expected time complexity is O(n2).

After the coding round, there were 3 rounds of interviews.

 

Round 2 (Technical Interview):

This round went about for nearly 50 minutes and it was quite smooth. The first question asked by the interviewer was based on my projects, experiences, and my current work in the ongoing internships. After this, one coding question based on a binary search was asked.

  • Given a sorted array pivoted (rotated by some number) at some point, find the position of a given element. 

I gave a brute force O(n) approach straight away and made it clear that I was thinking of an optimized solution. Later, I explained the O(log n) solution using binary search and was asked to write the code for the same. He found something peculiar in my code and I had to prove myself through a test case. Cross questioning on the written code was followed by a question to dry run the code on test cases where my code might fail. I suggested a test case and it failed. Finally, I made the corrections and the interviewer was quite satisfied. This round went pretty well.

 

Round 3 (Technical Interview):

 This round went for nearly 1 hour and 20 minutes. It wasn’t as smooth as the previous 2 rounds and I guess most of the filtering of candidates took place in this round. I was tested on my analytical, coding, and problem-solving skills in this round.

Why was I interested in machine learning and deep learning (which is my area of interest) and not my core branch subjects? 

Then, 3 output questions were asked, one of them was based on pointers, another was based on recursion and storage classes. I don’t remember the 3rd one.

The next set of questions were based on LRU cache. Define the LRU cache and what data structure would you use to implement it? My first approach was using queue but later on, I felt vectorized implementation along with hashing would work. I was questioned about its space and time complexity and was also asked to further optimize the space complexity. I gave a solution with optimized space complexity at the cost of time complexity. He seemed satisfied with the solutions. Then, I was asked about a real-life example of LRU cache. I couldn’t think of an example at that time.

Questions based on locked transactions in the banking sector. What will happen if 2 transactions are being made from the same account exactly at the same time? What are the different checks made by the bank to keep a check on frauds? I suggested some methods based on analytical thinking and observations from my daily life. 

How is a URL shortened? 

Given an array of integers what will be the maximum OR value? Find the smallest subset that gives the maximum OR value. I solved this using dynamic programming.

Given a BST, find the distance between 2 nodes whose values are given. I explained the DFS approach for this by taking one element as the root. 

 

Round 4(Technical + HR Interview):

This round lasted for about 45 minutes. Questions in this round were based on the following topics:

  1. Operating Systems
  2. Data Structures and Algorithms
  3. Machine Learning and Deep Learning 
  4. Project-based questions
  5. Networking
  6. System Design
  7. HR questions

My advice to all the candidates who are going to appear for an interview in the coming weeks or months is to stay calm and confident during the entire process. You can deliver your best only when you are calm and composed. According to me, the companies not only test you on your technical knowledge but also on how you interact during the interview and handle difficult situations. Students generally focus on OOPs, DS/Algo, but I think preparing on topics like Operating Systems, Networking, and System Design will be really helpful in the interview process.  

The master tip to each and every aspirant is to keep interacting with the interviewer, think aloud so that the interviewer gets to know your approach. 

by Expert (4,460 points)
1 like 0 dislike

Microsoft | OFF CAMPUS | December, 2021

 

Round 1(Coding Round):2 questions to be solved within 60 minutes.

  1. Invert a binary tree.
  2. Lexicographically smallest string formed by removing at most one character

Round 2(Technical Interview 1): Taken by a Software Engineer with around 2-3 years experience. 

  1. All 4 pillars of OOPS
  2. Difference between Linked List and Arrays
  3. Reverse a Linked List
  4. Difference between Queue and Priority Queue
  5. Given a few tables which have some values linking a few rows across tables, write a functional code to print the entry with highest priority. (Main focus here was on creating classes with modular and well defined structures, usage of correct data structures at right point [HashMap, ArrayList, PriorityQueue] and clean coding)

Round 3(Technical Interview 2): Taken by a Software Engineer with 5+ years of experience.

  1. Add two binary strings that have been represented using Linked Lists.
  2. Search for a word. (Trie based approach. Only asked for approach, did not ask to code)
  3. Discussion on Multi-Threading, Mutual Exclusion, Design Patterns in Java, Inheritance vs Interfaces, Synchronization, Producer-Consumer problem

Round 4(Manager Round): Taken by an Engineering  Manager with 20+ years of experience. After a quick introduction about myself, I was asked about          

  1. Discussion about current projects and tech stack
  2. Check whether a given parentheses expression is balanced or not
  3. Length of the longest substring in a string without repeating characters.

Tips:

  1. Focus on basics. DSA, OOPS, OS
  2. Show willingness and eagerness to learn and collaborate in technical interviews.
  3. Don’t lose faith and trust your preparation. I had previously been rejected by multiple product-based companies during campus placement and also during my off-campus attempts.
  4. Maintain a good connection with your assigned recruiter/HR. This shows an eagerness from your side and he/she can really guide you through the ins and outs of the process very well.
  5. Above all, believe in yourself.
by Expert (4,460 points)
1 like 0 dislike

Microsoft  | Off-CAMPUS.

2022, January

I got this opportunity through the Microsoft engage program 2022.

After the coding assessment, you will be assigned a mentor where you will have to show your work case in a period of 3 weeks. If you do not perform well during the mentorship program, you may not be called for the interviews.

 

Rounds:

  1. 1 round on CV selection
  2. 1 coding round
  3. 3 weeks mentorship program (similar to an internship), and based on your performance in the mentorship, there would be interview rounds (normal – 3 Technical rounds). Lucky me, I got a direct interview call after the coding round. All rounds (including interviews) were conducted on the Codility platform.

 

Coding Round (90 minutes): 

Two questions were there ranging between medium-hard types. I solved both of them within 40 minutes

Q1) Problem very similar to this one: https://codeforces.com/problemset/problem/1027/F

Concept: Use DSU or Graph.

Q2) Given N points (can be collinear) in the 2D plane. We are required to find 3 points such that the triangle formed by choosing these 3 points should not contain any other points inside the triangle.

Concept: You have to find the 3 closest points. Consider any point as a 1st point, then find the 2nd one which is closest to it using the DISTANCE FORMULA. Now you have 2 points, find the 3rd one which is closest to both of them (using the same concept), and also keep in mind that points should not be collinear (you can easily do this by checking that the slope of points 1 and 3 should not be equal to the slope of points 2 and 3).

 

Technical Round 1(based on DSA – 1 hr)

The round was completed in 20 minutes only

Find the cousins in a binary tree

 

Technical Round 2(DSA round – 1 hr): 

Took me almost 1 hour to write the full working code 

Find the next permutation

Find words in the matrix (for harder version, use Trie):

Word Search 1 Problem

Word Search 2 Problem 

 

Technical Round 3(Project and DSA round – 1 hr):

 40 – 45 minutes for the project and rest for the coding problem

Detailed discussion on any one of the projects: Stacks and techs used, why you made this app, the problem faced, how did you manage to make your app efficient, database structure and schemas, functional and non-functional requirements, security, scalability, etc.

1 Problem :- Prefix with Equivalent Frequencies.

Note: Even if you are not able to write the complete and working code, show your approach. They tell you to write the code to see if you are able to write what you think.

Be positive and aloud during interviews. Don’t be nervous and in a rush to answer the question. Take your time. Interviewers will help you whenever you will get stuck. Believe in yourself and always in God.

by Expert (4,460 points)
1 like 0 dislike

Microsoft | SDE-I (On-Campus)

21 December 2021

Online Assessment  – There were 2 coding questions.

Q1) There are N cities. Cities are connected by roads .(Basically given a graph). K of the cities has a hospital(Given an array of size K). Time taken to reach a hospital from a city is no of edges to the nearest city which contains a hospital. Find the maximum time taken to reach a hospital from all the N cities. 

Ans – (Just do a normal multi-point BFS and store the distance of every city and return the maximum one).

 

Q2) Given a tree of N nodes(0 as the root). Each node contains either ‘A’ or ‘B’. Return the longest path of the tree such that no consecutive letter of that path is the same.(Either “ABABA..” OR “BABABA”) .  

Ans – Pretty standard DFS question . Calculate the answer for each node as a root (sum of 2 best child subtree+1) and return the longest path (longest child subtree+1). Maximize the answer.

Luckily, Microsoft gave weightage to the time in which candidates solved the questions, rather than the gpa unlike some other companies. Around 40 were shortlisted for interviews.

 

Interview Round 1 – 

He introduced himself and asked me for an introduction and 1 of my project(mine was an e-commerce website) and asked some questions about it. (Ex-How would you handle multiple requests at the same time for the e-commerce website. How much load can your website take .)We had a discussion for around 20mins and then he asked me a coding question.

 

Given a 2D grid, there is a value present in each grid. 1 means this index is vaccinated . 0 means this index is not affected till now but not vaccinated .  -1 means this index is affected by the virus.  (Virus will spread from -1 to 0, in 4 directions) .Find the last day when virus spreading will stop.

I gave him the solution by multipoint bfs. He was quite satisfied with it and asked me to code it. After that he asked me some questions like count the number of indices which are not going to be affected at all(but not by this approach. I gave him the approach of doing a dfs from each indices having 0 value and if we find a 1 we will just return but if we find a -1 this index is surely going to be affected at some time. He was satisfied with it.)

Then he asked me to write some good  test cases for the original question , so that it will cover all the possibilities of the solution. At the end he was satisfied and asked me to wait in the call for next round.

 

Interview Round 2

After the introduction, he asked me about my internship experience and what work i have done there, the tech stack I have worked on. 

Then he asked me some oops concept (polymorphism, abstract classes).

After some time of discussion, he gave me a coding question. https://www.geeksforgeeks.org/find-pair-given-sum-bst/

But I had to code for the input as well(the whole bst and how i will take the input) and find all the pairs. He was satisfied with my code and asked me to stay on the call for next round.

 

Interview Round 3 – It was an HR round. 

He asked me different questions about my internship and what challenges I have faced during that. Why I want to join Microsoft and what I have to offer to the company and some other HR questions. 

Then he talked about the goal of Microsoft as a company and what is the work culture there etc. This round lasted around 35mins and my interview was done.

Verdict- Next day I got to know that I was selected for the role. 

 

Tips:

For the preparation point of view, my advice would be study all the CS fundamentals(oops, OS, DBMS, CN), practice as much as u can in GFG and Leetcode, know all of your project (like what technologies you have used and why you chose that). 

Also, some of my friends were asked System Design questions. So you should be prepared for that as well( e-commerce design, twitter design, lift design, parking lot design etc. ). 

Happy Coding!!

by Expert (4,460 points)