YOE: < 2 yrs
Location: Mountain View, CA
Attended a Google onsite recently. Was reached out by recruiter on LinkedIn. Skipped my phone interview and proceeded for onsite. Here's my interview experience.
I had 5 rounds of interviews [1 Googlyness, 4 Technical]:
Round 1: Googlyness - Standard behavioral questions - went well. Be prepared with some stories prior to the interview.
Round 2: Similar to the following problem [Solved using DP, missed some edge cases :( ]
https://leetcode.com/problems/student-attendance-record-ii/
Round 3:
Guy was very nice. Asked me about some mathematical concepts around permutation and combination. How many combinations will be there if I have 5 balls[A, B, C, D, E] and wanted to select 3. Now, write a program to generate all the combinations if I want to select 3 from those five balls.
[[A,B,C], [A,B,E], [A,B,D], ... ] output should contain 10 combinations in total
Round 4:
This was exactly what I was asked. Partially solved it
https://leetcode.com/discuss/interview-question/1504849/google-onsite
Round 5:
I was asked two questions in this round:
Q1: In this round, the interviewer asked me to write getEventDetails function. The catch was one do not have access to list of events and in order to get event details one has access to getEventByIndex function which will return event details but it requires index as param. So, I wasn't sure how to transform timestamp to index in order fetch event details. Proposed a binary search solution with lower bound to be 0 and upper bound as LONG.MAX_VALUE. Not sure if this was correct. Any suggestions around this will be helpful.
class Event {
long timestamp;
Calender(long timestamp) {
this.timestamp = timestamp;
}
}
public Event getEventByIndex(long index) {
...
}
public Event getEventDetails(long timestamp) {
// TODO
}
}Q2: Similar to number of islands with change slight change, find number of subgraphs:
Input = [A, B, C, D, E]
Subgraphs: A->B->C and D->E
Output: 2
we have access to helper function hasConnection(node1, node2) which returns true or false
eg, isConnected(A, B) returns true
isConnected(A, C) returns false
Summary:
Overall a good experience, unfortunately I didn't make it. Panel had some mixed reviews. Therefore, a reject. But I think good prepration will pay you off.