Microsoft Interview experience | Set 178 (On-Campus Internship for IDC)

There were a total of 3 rounds. 1st was online coding, 2nd was written coding and last round was divided in three parts, basically 3 Technical Interviews.

Round 1:

Online test on CoCubes contains 3 Coding Questions (Only Function to complete). Total time given was 75 minutes.

  1. Find the average of sum of ASCII values of all the characters in a string. Eaxmple:
  2. Input : swati
    Output :110.4
    LOGIC:  (115+119+97+116+105)/5= 110.4 
  3. Evaluate the value of an infix string. The string will not have any spaces or brackets and priority of ‘*’ and ‘/’ is greater then the priority of ‘+’ & ‘-‘ . Examples:
  4. Input : 5+10/2*6-3
    Output :32
    LOGIC: 5+5*6-3 = 5+30-3 = 35-3 = 32
  5. Given a BST, a min value and a max value, delete the nodes of the BST having data smaller than min value and greater than max value. Example:
Input :


                 /      \

              8           13

           /            /     \

         2           11        15

       minValue= 3   maxValue= 13 Output :


                /    \

              8      13



The online round was easy as they were looking whether the basic concepts of students are clear or not. A total of 109 students sat for the online rounds out of which 31 qualified for the next round.

Round 2: 

Written Test had 2 questions and total time given was 45 minutes.

  1. Given an array and a key you need to rotate the array elements ‘key’ times. Example:
  2. Input 1:  arr[]= [1, 2, 3, 4, 5, 6]
    Output : [ 3, 4, 5, 6, 1, 2]
    Input 2 : arr[]= [1, 2, 3, 4, 5, 6]
    Output : [1, 2, 3, 4, 5, 6] 
  3. Given a string you need to print all its sub strings
    in lexicographic order. Example:
Input :  ABC

Write a lot of comments to make your program more and more readable. Make sure your work is neat and try to write the code that is most optimized and uses least space. But if optimized code doesn’t strike you write the logic you can think of. After this round 14 students were selected for the 3rd round.

Round 3:

This round is divided into 3 Technical Interviews.

Technical Interview 1: 

  • Subjective Questions:
  1.  How can you implement a virtual destructor ?
  2.  Which is better for traversal array or link list ?
  3. What is difference between recursion and function looping?
  4. What features do you think can be added or modified in MS Word  ?
  5. Practical uses of Stack.
  •    Coding Questions:
  1. Given a decimal number, convert it to its equivalent roman number.
  2. Given first n natural numbers in an array, it is said that one number is missing. Write a code to find the missing number.
  3. Given first n natural numbers in an array, it is now said that two numbers are missing. Write a code to find the missing numbers.

When I got my first question from OOPs, I told the truth to the interviewer that I have not yet studied OOPs and requested him to ask questions from Data Structures. At the end he asked me if I had any questions for him, so I asked him to review  me as a candidate for their company and which concepts I need to learn and improve. Apart from these questions we had a conversation about my college and what advice he would like to give to all the students aspiring for a technical job in any MNC( not necessarily Microsoft only).

Technical Interview 2:

  •       General Questions: 
  1. Why Microsoft should hire you? What makes you different from other candidates shortlisted for the interview?
  2. He asked about my summer internship and the projects I had mentioned in my CV.
  3. Asked the difference between stack, queue and link list and also which is better.
  •      Coding Question:
  1. Given a list of strings find the maximum length string which is made up of the combination of other strings in the list.
Input :[Information, Technology, Batchof2020, 
InformationTechnology, Batchof2020InformationInternship]

Output : InformationTechnology

Note:"Batchof2020InformationInternship" is the longest string 
but its has a sub string Internship which
 is not a string in the given list, hence its not the output.

Technical Interview 3:

In this  round, the interviewer went through my whole CV thoroughly and asked me about my hobbies of which debating was the most  highlighted one. So he had a pseudo debate cum discussion with me on the role of a good speaker.

After that we played a word guessing game, I don’t remember the name of the game. He basically explained the game to me and told me about all the rules. After playing the game he told me to write the code for the game and that it will be my last question for the day. I wrote the code in 4-5 minutes. He seemed satisfied with the code and wished me Best of Luck!

This was the end of Selection Process and approximately 10 minutes after I was told that I am selected 😀

It was my first interview experience and I got selected! The 10 hour long process ended giving me the best opportunity of my life.

This article is contributed by Swati Bararia.


Write your Interview Experience or mail it to

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Improved By : Swati Bararia


Recommended Posts:

3.5 Average Difficulty : 3.5/5.0
Based on 12 vote(s)

User Actions