google swe l4 phone screening | rejected
Summary
I had a phone screening for a SWE L4 position at Google, where I was asked a question about active tickets within a time range. Despite coding and explaining my approach, I received negative feedback.
Full Experience
question:
given a list of tickets(start_time, end_time) and a number N. find how many active tickets were there at time t where 0<= t < N.
my approach:
1. sort tickets by start_time and then end_time in asc order
2. use two pointers i=0, j=0 to create a window
3. for any time t, size of window will give no of active tickets for that time
4. for time t+1 move pointer j to include more tickets and move pointer i to remove expired tickets
time complexity: O(nlogn)
I was able to code and explain the approach. inteviewer even said "all the best for your loop round", but got a call that feedback was -ve.
Interview Questions (1)
given a list of tickets(start_time, end_time) and a number N. find how many active tickets were there at time t where 0<= t < N.