MS onsite

I had total four four rounds at Microsoft which are as follows:

Phone Interview (1 hour):

    Given an array of integers return sorted array using swap function which can swap any element (present at ith index) with the element present at 0th index only.
    Swap function should take only one parameter(ith index) which will swap the the element present at ith index with 0th index.


Round 1 (1 hour):

Round 2 (1 hour):

  • 45 Minutes: Consider an array of distinct numbers sorted in increasing order. The array has been rotated (clockwise) k number of times. Given such an array, find the value of k.
    Follow Up: Consider if duplicate elements are also present in the array.
  • 15 Minutes: Behavioral Questions

Round 3 (1 hour):

To sum up my experience, they expect you to clarify the doubts and cover the edge scenarios. Be clear in your approach. Finally after two days i heard those three magical words. U GOT THIS!!!.

I would highly recommect to solve Top Interview Questions from LeetCode. It helped me a lot.