Open In App

Microsoft Interview Experience for Summer Internship (On-Campus)

It is an opportunity for students who are pursuing a bachelor’s degree and are in their pre-final year. Microsoft visited my college campus and this was an on-campus opportunity.

Round 1: It was an online round that consisted of 3 coding questions of easy to medium level and were based on arrays and contained the usage of maps. After round 1, approximately after 15-20 days, I received an email and it was stated that I was shortlisted for an interview.



There were 2 interview rounds in total. I was rejected after the final round of interviews. Still, I would like to share my experience.

Interview Round 1:



After that, he told me to proceed with DSA.

He shared a hackerrank live coding link in which when I was coding, he was able to see it live, and along with this he also asked me to share my screen.

Now I will state my question:

Question 1: Roman numerals are represented by seven different symbols: I, V, X, L, C, D, and M.

Symbol       Value
I             1
V             5
X             10
L             50
C             100
D             500
M             1000

For example, 2 is written as II in Roman numeral, just two ones added together. 12 is written as XII, which is simply X + II. The number 27 is written as XXVII, which is XX + V + II.

Roman numerals are usually written from largest to smallest from left to right. However, the numeral for four is not IIII. Instead, the number four is written as IV. Because the one is before the five we subtract it making four. The same principle applies to the number nine, which is written as IX. There are six instances where subtraction is used:

Example 1:

Input: num = 3
Output: "III"
Explanation: 3 is represented as 3 ones.

Example 2:

Input: num = 58
Output: "LVIII"
Explanation: L = 50, V = 5, III = 3.

Example 3:

Input: num = 1994
Output: "MCMXCIV"
Explanation: M = 1000, CM = 900, XC = 90 and IV = 4.
Constraints:
1 <= num <= 3999

Interview Round 2: The interview started with my introduction and then he gave me a question to solve.

Question 1: Given an array containing only 0’s, 1’s, and 2’s, sort it in linear time and using constant space.

For example,

Input:  { 0, 1, 2, 2, 1, 0, 0, 2, 0, 1, 1, 0 }
 
Output: { 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2 }

Though I wasn’t selected I got to learn that sometimes, silly mistakes can be devastating. So don’t panic in interviews, instead, write the code calmly to avoid such silly mistakes.

Article Tags :