Microsoft | Interview Drive | Office Org

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2023-10-07Added By Anonymous
Source: Link

I recently attended interview (virtual onsite) drive at Microsoft(Office Org). Interview was suppose to have 4 rounds in total.


Round 1:


Given 4 points(X,Y), check if it forms square. Question was very simple, but I missed one condition where side could be 0, due to which a testcase didn't work where given points can form line.


Round 2:

Given an array that represents flowers and plots, such that we cannot add flower adjacent to another flower. arr= [1,0,0,0,1] n= 2, in this input 1- flower, 0- empty plot. We need to return boolean yes/no saying can we add 'n' flowers or not.


I used DP approach and within half an hour interview was completed as I executed all testcases.


Now I was waiting for round 3, but I wasn't shortlisted. That means, even if one round, one testcase is not passing, interviewer is not considering candidate for next rounds.

Good Luck to others!!!

Comments