Google L4 Interview Experience
Summary
I interviewed for an L4 position at Google, completing a pre-screening and three onsite rounds. The interviews covered API implementations for restaurant table allocation and a chat system, an IP address to city mapping problem, and a modified greedy/knapsack type question. I was rejected after the third onsite round.
Full Experience
Recruiter from Google's Talent Acquisition Partner companies reached out via call.
Pre - screeing Round
- Interviewer was from Switzerland (about 35y)
- Asked a question to implement few APIs for Restaurant table allocation.
- JoinWaitlist() (A group of people will join the restaurant waitlist)
- LeaveWaitlist()
- AllocateTable(int size) => Allocate the table to the first group which has a groupsize = size, if no such group allocate to size-1,-2 etc.
- It was not that difficult I would rate the difficulty somewhere between implementing a LRU Cache and LFU Cache.
- Feedback - Very good
Onsite Round 1
- Interviewer from Bangalore/Hyderabad (about 28y)
- Implement few Chat related APIs (I dont exactly remember)
- You have kind of a fream of messages of format
- (From, To, Message),(From, To, message)...
- Needed to implement APIs like
- UserWithMostChats()
- DeleteUser() => (all chats should be removed from other users as well)
- Some other APIs I dont remember
- This was also not that difficult
- Feedback : Good
Onsite Round 2
- Interviewer from Bangalore/Hyderabad (about 40-45y)
- Given Ip address ranges and their corresponding city
- (IP_Start, IP_End, "Arizona"),... etc
- You will be given an IP address find which city it belongs to
- Binary search question, asked in google interviews several times
- I though it will be very simple
- Got kind of confused while writing high/low update conditions, missed 2 edge cases also :(
- Feedback : Bad (Comment : Missed edge cases, quoted wrong Time Complexity (Dont when when this happened!))
Onsite Round 3
- Interviewer from Bangalore/Hyderabad (about 28y)
- Started with simple greedy question (almost same as fractional knapsack)
- Modified it to be a Heap based greedy question
- I arrived at the optimal solution during discussion but there was no time to code it.
- Feedback : Bad (Comment: Didnt leave enough time to complete question)
Rejected after this, Round 4 didnt happen (Behavioral)!
Interview Questions (3)
Implement APIs for a restaurant table allocation system:
- JoinWaitlist(): A group of people will join the restaurant waitlist.
- LeaveWaitlist()
- AllocateTable(int size): Allocate a table to the first group which has a group size = size. If no such group exists, allocate to a group with size-1, size-2, etc.
Given a stream of messages in the format (From, To, Message), implement the following APIs:
- UserWithMostChats(): Return the user who has sent or received the most chats.
- DeleteUser(): All chats involving this user should be removed from other users as well.
Given a list of IP address ranges and their corresponding cities (e.g., (IP_Start, IP_End, "Arizona"),... etc), implement a function that, given an IP address, finds which city it belongs to.