google logo
Google· SWE L4

google swe l4 phone screening | rejected

Posted
22 Apr 2025
325 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.

How it went

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.

Questions asked (1)

  1. 01

    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.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Google recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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