Skip to content
Related Articles

Related Articles

Microsoft Interview experience | Set 96 (On-Campus Internship for IDC)
  • Difficulty Level : Medium
  • Last Updated : 10 Jan, 2019

Round 1 : (1hr 15 min)

Online test on CoCubes contains 3 Coding Questions

  1. Find the number of times “carry” is 1 while performing addition on two numbers
    Input:  56  99
    Output:   3
  2. Given an array of integers, shift all the numbers that are ‘-ve’ to the left and ‘+ve’ to the right ‘in-place’ (maintain the order of all the -ve numbers same as of the given array and the order of all the +ve numbers same as of the given array )
    Input: 10 7 -5 9 -12 15
    Output: -5 -12 10 7 9 15  
  3. Find the sum of all nodes that have no child at minimum level. Return -1 if root is NULL
    Input: (Root of the tree is passed into the function) 
            / \
           2   6
          /\   /\
         7  3 9  4
             / \
            8   3
    Output: 14 (7+3+4)

    Around 65 students were selected to Round2

Round 2 : Group Fliers(around 45 min)

  1. We have to take ‘n’ polynomials as input and we had to write functions for

    Sort(P), Add(P1,P2), Sub(P1,P2), Multiply(P1,P2)

    (Implemented Sort function according to the indices of the polynomial and all the functions optimized by space and time)

    Around 28 students got selected for technical interview

Round 3 : Technical Interview(around 40-45 min)

  1. Tell about yourself
  2. What are the courses you have done?
  3. Suppose you have details of some stock market(Day & price were given), you will earn profit only if you buy stocks cheaper than the amount you sell them for.Write a program to find maximum profit that could be attained (using only one loopO(n) time and O(1) space)
    Day  :  1  2  3  4  5  6  7
    Price: 60 10 5 12 8 40 9  
    Output:  35 (40-5) 

    GeeksforGeeks Link

  4. Difference between Processes & Threads?
  5. Suppose there is a sorted array and you are given the array by rotating k units.Find k by writing a program (O(logn) time)
        Input:    5 6 7 1 2 3 4
        Output: 3(3 rotations happened) 

Round 4 : HR INTERVIEW(around 30 min) (On skype)

  1. Tell about yourself
  2. Previous intern experience and the details of the work assigned
  3. What are the courses you have done and favourite course
  4. Explain all sorting algorithms and decide which one is better
  5. What projects have you done
  6. Languages used.
  7. Which was the most difficult task while doing your projects
  8. How do you implement a library of books in json data(which fields were needed and stuff like that)
  9. Why Microsoft & Do you think you are eligible for it
  10. Goals and things you would like to achieve in future

Overall, the experience was nice. And the interviewers were friendly.

Thanks GFG.

If you like GeeksforGeeks and would like to contribute, you can also write an article and 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

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.

My Personal Notes arrow_drop_up
Recommended Articles
Page :