Open In App

Microsoft Interview Experience for SWE Summer Intern (Off-Campus)

Many online platforms regularly update you about internships in your preferred skills. for eg unstop, cuvette etc. Subscribe to their mail services (which is free of cost) and make a habit of checking your mail daily.

for my application, one of my friends has applied for me, I only came to know when I received the mail for a coding interview.



Coding round-

The coding round had 1.5 hours and it had two questions. Here, you are allowed to code in your own IDE i.e. VS code or others, and copy-paste the code and run all the test cases. the two questions that were asked were

  1. You are given an array A consisting of N numbers. In one move you can delete either the first two, the last two, or the first and last elements of A. No move can be performed if the length of A is smaller than 2. The result of each move is the sum of the deleted elements. Write a function: int solution(vector<int> &A) that, given an array A of N integers, returns the maximum number of moves that can be performed on A, such that all performed moves have the same result.
  2. You are given an undirected graph consisting of N vertices, numbered from 0 to N-1, connected with M edges. The graph is described by two arrays, A and B, both of length M. A pair (A[K], B[K]), for K from 0 to M-1, describes an edge between vertex A[K] and vertex BIKI. Each second, every vertex with at most one edge connected to it disappears. Every edge that is connected to one of the disappearing vertices also disappears. After how many seconds will the vertices stop disappearing?

I completed the two questions within half an hour and also the first one I did in Python while the second one I did in C++ so it is not important to stick to a particular language in the contest.



Interview round I

After the coding round, when I received mail for the Interview round, I had a few days which I utilized to revise the topics I felt weak in and also those that were asked in the coding round. I paid special effort on topics-

Presenting a question on creating a given sum from three sorted arrays. Despite an internet glitch, they were cooperative. I initiated with a basic brute-force solution, which they asked me to code.

After coding the initial solution, he requested improvements, and I suggested using break and continue, meeting his expectations. Grateful for his assistance in identifying a bracket mistake, I maintained a continuous dialogue, explaining each coding step. When asked for a better solution, I proposed a binary search approach but, due to time constraints, we concluded the interview.

Interview round II

The second round was scheduled on the same day, and I checked the mail(telling that I had cleared the first round) just 10 minutes before the interview. This round was a bit more lengthy than the previous one, with the single interviewer.

I greeted him, shared my excitement about the day, and accidentally revealed I hadn’t eaten since morning around 4 in the evening. Despite his offer to wait while I ate, I insisted on proceeding. Skipping introductions, he immediately asked me to share my screen and code.

The first question he asked me was about using predefined APIs to traverse directories and files and I was completely unaware of that I politely told him that as perm my current curriculum I am not familiar to this.

After around 3 weeks I received a mail from Microsoft informing that I have been selected

Article Tags :