- Published on
SDE2 Interview || Microsoft Edge Team || 5.5 YOE
- Author
- Shared Anonymously
Last Week I had interview with edge Team. I gave three rounds after which I couldn't proceed further.
First Round was Online Assessment:
- One question was related to maximum Profit from stocks such that a person can either buy or sell shares and can hold atmost 1 stock at any given point. Also to start with person was already holding stock intially.
- Second question was relatively easier one, I don't remember the question but we need to convert the answer to modulo 10^9 and there I used long datatype instead of int.
Onsite Round 1: Coding
There are N cows and M feeding points at distances = {2,5,15,5000} and cows appetite = {7,1,0,2,11}. Find Minimum allocation time for all cows such that the cows start from origin and in every unit of time cows can either eat or walk.
Assumption - cows can move together, but at a time, only one cow can eat at a feeding point. That means, if let's say one cow is eating at feeding point 1, you need to allocate rest of cows to other feeding points, such that other cows can either wait for first cow to finish or cows can travel to other feeding points. Overall time of allocation should be minimum.
I solved it using priorityQueue to decide whether to walk or check if any previous feeding point is available. You can suggest if there is any better approach for the problem.
Round 2: Behavioural Round
Questions around previous work experience. detailed discussion on my contribution to project. What things went wrong? What really motivates me in work? After discussion, interviewer asked me question on removing loop from singly linkedList.
Round 3:
Interviewer asked question:
Given the schedule of 3 employees, we need to find free slot to schedule a meeting. For this I defined the class employee and class meeting and then taking those as input I wrote the code for employee free time.
Interview was for 1 hour but interviewer seems to be in hurry and he cut short the interview to 40-45 mins. I think interviewer was expecting LLD but he never mentioned that and I attempted the problem in algorithmic way(focussed on working solution). Maybe that's the reason I couldn't make it to next rounds.
I hope my post will help others prepare better. Wish you all best of luck!!