Hello everyone,
My recent interview experience with Google. A recruiter reached out to me in April, suggesting I might be a good fit for a position (I currently work at one of FAANG companies and I assume my profile went through some default filters). I scheduled a Phone Screen for 3 weeks later.
Phone Screen 1:
A medium level question based on Graph. Something similar to given a node, return number of neigbors in the nth level.
I was able to discuss and write code for this, was done in about 20 mins. Followed by some modifications to the question and how you would modify the code if there was a Stream of input, which data structues would you choose.
Response:
Got positive feedback and would like to move to virtual on-site. But 3 days later, recruiter called me saying, unfortunately they could not get enough data points for an L4 and would like to do another phone screen before we can go for an on-site. I scheduled the follow up Phone Screen in the next week.
Phone Screen 2:
Given a sorted array of integers(1 to n), return the first missing integer in the range 1 to n. Discussed a basic approach first and then disussed Binary Search approach to reduce run time. Ended up writing the code for Binary Search. Interviewer seemed to be satisfied.
Response:
Recruiter called in 3 days again saying that the response was positive again and would like to schedule the virtual on-site. I scheduled the onsite for 4 weeks later.
Virtual Onsite
Interview 1:
Given a bomb sequence pattern as a binary sequence (something like 1011), and a defuse pattern (something like 1101) and list of safe patterns (0000, 1010, 1100, etc), return a String response "DEFUSED" if the bomb can be defused, "RUN" otherwise. Note: Going from one to state to next is done by flipping just one bit in the current state. (You can go from 1011 to 1010, 1111, 0011, etc).
Discussed a couple of approaches in the first 5 mins. Later realized that this can be modeled as a graph problem, with safe states as neighbors, if neighbor is defuse pattern, return "DEFUSE". Wrote a DFS for the solution, discussed run times.
Interview 2:
Easy-Medium level question. Given an input to first name to list of emails for several people. If name and email for any person matches, merge the emails list together. Return the final list of merged emails wherever possible. I am assuming this round was focussed on OOP as well.
Disucssed DS for storing the names and emails, Map, Multi-Map etc. Talked about how code would be broken down into different helper methods etc. Follow ups on this as well.
Interview 3:
Warm-up question: Given a matrix (M X N) of integers, return true if a Path exists between (0,0) and (M-1, N-1). You can only go in 4 directions (Up, Down, Left, Right) and can only go to a neighbor if the value is less than or equal to current value (cannot move to a cell that has higher value than current).
2nd question:
For the same matrix above, now moving from one cell to another has a cost of difference between the cell values. Find the minimum cost for going from (0,0) to (M-1, N-1).
Discussed DFS for this and how we can modify the code. Interviewer said it wil work but can we make it better. Discussed Dijkshtra's algorithm and wrote code for it. Discussed run times.
Interview 4:
Given logs from a YouTube service, and an Integer K. Return K most searched strings from the logs. Discussed creating map of unique strings and counts and going over the map to find the K strings with highest counts by sorting the unique strings by their count. Talked about improving the sort from O(NlogN) to O(NlogK) by using a min heap to sort.
Follow ups: How would you change your code for a stream of logs, went into distributed systems a little bit. Interviewer said that my points and solution was acceptable.
Interview 5:
Behavioral round. Interviewer thought it was a coding round and started describing the question, I had to clarify that recruiter said this is going to be a behavioral round but I am happy to answer a coding question as well. Interviewer was confused and checked his notes and then apologized. He quickly spent 5 mins going over a pdf that recruiter sent him to refresh his memory on what is to be asked.
He followed up with several "Can you describe a situation" questions.
Very subjective, so hard to say but I think it went well. Discussed a lot of situations from the last 5 years, shared a few laughs about a few of them.
Response:
Recruiter called a week later saying that unfortunately they will not be going forward with a hire decision and she will reach out after 1 year and hopefully outcome will be different then. I was a little confused with the outcome, I thought I did well and answered all questions and follow ups as well, apparently I did not do as well as I thought I did.
I asked for further feedback, she said, everyone agreed that coding and DS was very good, was able to disucss ideas well and convert into clean code. But code efficacy needs to be improved. Wasn't really sure what that meant but I guess I will keep doing LeetCode and try again next year.
Thanks for all the valuable discussions and solutions on this platform.
Cheers!