Skip to content
Related Articles

Related Articles

Improve Article
Microsoft Interview Experience | Set 157 (On-Campus)
  • Difficulty Level : Medium
  • Last Updated : 18 Dec, 2018

Microsoft visited our campus. Prior to that, about a month ago they had conducted an online coding test. The interview consisted of 3 f2f rounds.

Online test:

    The test comprised of 3 coding questions. The questions were not same for everyone.

  1. Find the missing number in an AP series.
  2. Find max sum path(sum of values of nodes) in a binary tree. The nodes may have negative values too.
  3. Given a binary tree, find the number of subtrees that sum up to a particular value.

Round 1:

  1. General introduction. Project description.
  2. Serialize and deserialize a binary tree.

    Full code was expected.

Round 2:



  1. General introduction.
  2. How would you make loading of webpages faster?
  3. Said something about cache, server-side loadbalancer etc. The interviewer went into details of caching, asked about several situations like, what if power failure occurs while writing to database, leading to a brief discussion on checkpoints, log files etc.
  4. Finally he asked me to design LRU cache. Was expecting only code snippets and proper data structure usage.

Round 3:

  1. General introduction.
  2. Connect all the nodes in the same level of a binary tree.

    I proposed a basic level order traversal using queue.https://www.geeksforgeeks.org/connect-nodes-level-level-order-traversal/

    But he came up with a bunch of constraints, so I gave this solution instead.
    https://www.geeksforgeeks.org/connect-nodes-at-same-level-with-o1-extra-space/

    He didn’t look very pleased, but moved on.

  3. Given a circular array that has been rotated, find a particular element in it.

    Gave the basic O(logn) approach for finding element in sorted rotated array by finding pivot first.

    He asked me to do it in one go without separately finding pivot.

    Wasn’t too hard to figure out.

    He seemed happy. Asked me if I had any questions. Explained about his work at Microsoft.

 

 

 

About 1.5 hrs later they declared the results. They had selected 4 students for Microsoft Redmond and around 8-9 for MSIDC, myself included 🙂

 

 

 

 

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 :