Microsoft interview experience (For SDE-1)

Total there are four rounds in the interview process. 3 rounds data structures & algorithms and one round is about system design. I was asked to write code on white paper for all these questions.

Round 1:

1. You are given a entry & exit times of all people into office. The task is find out what is the time instant at which there are maximum number of people, if there are more than one time, return the first time.

Input format:

[entry times array]



[ exit times array]

Input:

9 1 2 5 6 8

10 4 3 6 7 9

output:   2

explanation: at time 2 there are two people. Person who came at time[1] and person who came at time[2] are still inside the office.

2. This is the second question.

Round 2:

  1. This is the first question.
  2. This question is same as first round second question but the data structure asked to reverse here is queue and without using any extra space and O(n) time complexity.
    • Input format: [queue], [group size]
    • input : 4 5 3 2 5 6 7 1, 3
    • output: 3 5 4 6 5 2 1 7

Round 3:

This is a design round. Question asked was this.

Round 4:

This is the question that is asked in this round.

 

All questions are expected to be solved in O(n) time complexity and O(1) time complexity. Last round question desired time complexity is O(logn) with O(1) space.

Write your Interview Experience or mail it to contribute@geeksforgeeks.org

My Personal Notes arrow_drop_up

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

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.