I recently attended a virtual onsite interview at Microsoft (Office Org). The interview was supposed to have 4 rounds in total.
Round 1:
Given 4 points (X,Y), check if it forms a square. The question was very simple, but I missed one condition where the side could be 0, due to which a testcase didn't work where given points can form a line.
Round 2:
Given an array that represents flowers and plots, such that we cannot add a 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 a boolean yes/no saying can we add 'n' flowers or not. I used a DP approach and within half an hour the 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, the interviewer is not considering the candidate for the next rounds.