Open In App
Related Articles

Microsoft interview experience (For SDE-1)

Improve Article
Save Article
Like Article

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]


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.

Last Updated : 26 Apr, 2020
Like Article
Save Article
Similar Reads