Google Phone Screen [L3 London]
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:
- Dont output empty intervals (no people)
- Multiple people can enter or leave at same time
Edit:
Status: Still waiting for feedback.
My approach:
- will update very soon
Interview Questions (1)
Active People at Intervals from Logs
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:
- Dont output empty intervals (no people)
- Multiple people can enter or leave at same time