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.
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.
[entry times array]
[ exit times array]
9 1 2 5 6 8
10 4 3 6 7 9
explanation: at time 2 there are two people. Person who came at time and person who came at time are still inside the office.
2. This is the second question.
- This is the first question.
- 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
This is a design round. Question asked was this.
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.