I applied through microsoft portal in july and got mail about OA which was in August .OA consists of two medium level questions from 1 from string+dp and . And i solved both of them and after 25-30 days i got mail regarding scheduling my interview call On 16 sept 2024 i was having my interview which started with brief introduction and after that interviewer told me about the Question i was asked a single question it was probably a hard one .i was able to give logic behind the question and nont able to complete the whole code but reponse from the interviewer is positive i was hoping best but at the end no call for the second round i was disappointed with my efforts...
here is that interview question
Imagine that you want to schedule a meeting of a certain duration with a co-worker. You have access to your calendar and your co-worker's calendar (both of which contain your respective meetings for the day, in the form of [startTime, endTime]), as well as both
of your daily bounds (i.e., the earliest and latest times at which you're available for meetings every day, in the form of [earliestTime, latestTime]).
Write a function that takes in your calendar, your daily bounds, your co-worker's calendar, your co-worker's daily bounds, and the duration of the meeting that you want to schedule, and that returns a list of all the time blocks (in the form of [startTime, endTime]) during which you could schedule the meeting, ordered from earliest time block to latest