Google Phone Screen [L3 London]

google logo
google
SDE ILondon
January 12, 20263 reads

Summary

I had a phone screen interview with Google for an L3 position in London. I was asked a problem about tracking people's presence in intervals based on entry/exit logs, and I'm currently waiting for feedback.

Full Experience

Question

Given logs when people enter and leave return who was there at each interval

input:

name | start_time | end_time
Abby         10        100
Ben          50        70
Carla        60        90
Bob          110       120

output:

start_time | end_time | names
   10           50       Abby
   50           60       Abby, Ben, Carla
   60           70       Abby, Ben, Carla
   70           90       Abby, Carla
   90           100      Abby
   110          120      Bob

Clarifications:

  1. Dont output empty intervals (no people)
  2. Multiple people can enter or leave at same time

Edit:

Status: Still waiting for feedback.

My approach:

  • will update very soon

Interview Questions (1)

Q1
Active People at Intervals from Logs
Data Structures & Algorithms

Given logs when people enter and leave return who was there at each interval

input:

name | start_time | end_time
Abby         10        100
Ben          50        70
Carla        60        90
Bob          110       120

output:

start_time | end_time | names
   10           50       Abby
   50           60       Abby, Ben, Carla
   60           70       Abby, Ben, Carla
   70           90       Abby, Carla
   90           100      Abby
   110          120      Bob

Clarifications:

  1. Dont output empty intervals (no people)
  2. Multiple people can enter or leave at same time
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!