Open In App

Microsoft Interview Experience Internship | On-Campus

Process: Online Test followed by 2 Rounds of interviews

Online Test: Platform Codility



2 coding problems in 90 minutes (1 Easy + 1 Medium)

Shortlisting criteria: Students who solved 2 problems completely, and had CGPA 9+(for boys) and 8+(for girls) were called for interviews. The cutoff for CGPA depends on the students in the college.



Platform for interviews- MS teams + Codility

Round: 1 Interview Technical

Time– 45 minutes

  1. Firstly, the interviewer asked the approaches of both the problems in the online test
  2. Next, he gave a coding Problem: https://leetcode.com/problems/restore-ip-addresses/
  3. Next to the coding problem-

Given an array with elements that can be positive, negative, or zero. Find the maximum subset-sum of elements that you can make from the given array such that for every two consecutive elements in the array, at least one of the elements is present in our subset.

Solution : 

Take dp[i][0]=maximum subset sum that can be made till ith index, such that I don’t take the ith element

        dp[i][1]=maximum subset sum that can be made till ith index, such that I take the ith element

Recurrence- dp[i][0]=dp[i-1][1]

                    dp[i][1]=max(dp[i-1][0],dp[i-1][1])+A[i]

Final answer= max(dp[n][0],dp[n][1])

Proof of why greedy fails, and why you are applying DP, has to be provided.

Suggestion: 

Round 2: Interview [Technical+ HR]

Problem:  Given a binary tree, find the number of same-value subtrees in the given binary tree. A same-value subtree is a subtree in which all nodes have the same value.

Suggestion :

Article Tags :