Round 1 Googliness Round:
1) brief intro about Interviewer and asked brief intro about me.
2) What is the best thing you did in your professinal experience and why?
3) Have you ever got a conflict and how did you resolve it?
4) Have you helped any other person work wise..
5) Asked about current project details and internals of the design which we are
following and asked about improvements in the design.
=================================================================
Question 1: Round 2: Coding
a) Given on-call rotation schedule for multiple people by: their name, start time
and end time of the rotation:
Abby 1 10
Ben 5 7
Carla 6 12
David 15, 17
and given t = 9, return a list of names who are on call at time t.
Expected output: [Abby, Carla]
b) Return a rotation table without overlapping periods representing who are on call
during that time. Return "Start time", "End time" and list of names:
1 5 Abby
5 6 Abby, Ben
6 7 Abby, Ben, Carla
7 10 Abby, Carla
10 12 Carla
15 17 David
===========================================================
Question 2: Round 3 : Coding
Background Define the K-window of a list to be the collection of distinct values of
its first K elements. E.g.,
for the list [1, 2, 1, 3, 4, 5], the 1-window is the collection [1],
the 2-window is the collection [1, 2], and the 3 window is the collection [1, 2] -
(duplicate 1 considered only once).
Question Given two lists of integers, list1 and list2, and a parameter K,
remove the minimum number of elements from list2 so that the K-window of the
modified list2 will have no elements in common with the K-window of list1.
Example Input: list1 [1, 2, 3, 4, 5, 6], list2 [3, 1, 1, 2, 4, 5, 6, 1]
For K = 1: Nothing needs to be removed. The solution is [3, 1, 1, 2, 4, 5, 6, 1].
For K = 2: Remove 1, 1, 2 (indices 1, 2, 3) from list2. The solution is [3, 4, 5,
6, 1].
1) Interviewer asked to optimize above program in terms of not to check elements
twice in kth window of set 1
2) For same question list 1 will be common, We will have n lists like list 2, How
will you solve this problem
==========================================================
Question 3: Round 4 : Coding
You have a stream of rpc requests coming in. Each log is of the form {id,
timestamp, type(start/end)}. Given a timeout T, you need to figure out at the
earliest possible time if a request has timed out.
Eg :
id - time - type
0 - 0 - Start
1 - 1 - Start
0 - 2 - End
2 - 6 - Start
1 - 7 - End
Timeout = 3
Ans : {1, 6} ( figured out id 1 had timed out at time 6 )
From previous google Interview questions:
https://leetcode.com/discuss/interview-question/924141/google-phone-screen-new-grad