google swe l4 phone screening | rejected

google logo
google
SWE L4
April 22, 20253 reads

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)

Q1
Count Active Tickets in Time Range
Data Structures & Algorithms

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.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!