Google | onsite | not location specific | Senior position | Awaiting
Anonymous User
6835

YOE: 20
I posted my FB experience at: https://leetcode.com/discuss/interview-experience/1060032/Facebook-or-Seattle-or-onsite-or-reject.

It all started with a phone call from a Google recruiter...... I think they keep chasing people who are borderline. And I don't even remember now how many times I have failed G interview. But I believe you are allowed to dream. I failed phone interview once and failed actual onsite 3-4 times. Last time my entire loop got cacnelled and I have to redo the loops. I am considering that as 1 loop only. So everytime I do good on 2, average on 1 and falter 2. Again that is my analysis. Google interviews are difficult and I have never been lucky to get questions that I have already seen. But G interviews preparation has helped me landing good job in other FAANG companies and I always learn new things. So when recruiter told my first reaction was 'No, I do not want to go through another heartbreak'. And I told so. But the recruiter literally chased me for 6 months and I was ready for another heartbreak.

In past two times, G has waived my phone screen but this time that was not the case. So back to phone screen.

Preparation: 10 weeks.
Started with basics Linked List, Stack, Queue, Monotonic Stack, Array manipulation, prefix, suffix sum etc.
Special focus on BT and BST. This helps me mastering recursion and I am more confortable with recursion. Two great sites for questions. Do not look at their answer as some of them are wrong. I mean not all but please validate. However I found it useful from the question list. They are exhaustive and a good practice ground. Solved half of them and solved others mentally. I mean went through the logic in my mind and was comfortable coding it.
www. techiedelight .com/binary-search-tree-bst-interview-questions (remove spaces)
medium com/techie-delight/binary-tree-interview-questions-and-practice-problems-439df7e5ea1f
Once you solve all by yourself and fully understanding the concepts there is hardly any BT question you cannot do. Thank you techie delight.
Next came heap, priority queue, treemap etc. Know Java (or whatever programming language you work on). Trust me I work in Java and has hardly used TreeMap or Priority Queue in real life.

Now moving to advance algorithms and data structures.
Backtrackikng - base condition (when to stop), continue and backtrack. String are immutable and lists are not. Remember this trick. Again these are fairly straight forward. But did work on coin change, palindrome partitioniong, permutation etc. Leetcode has more than enough. And worked on memoization.
Grid traversing problems (2 D array with obstacles and directions you are allowed to go) - I have failed G interview 2 times because of this and hence prepared.
Graph - 22 years back in school graph and computer graphics were my favorite subject. But I also falter here. Knowing DFS/BFS is must. I know MST, Dijkstra etc. But I didn't spend enough time on those questions (time is limited). I think asking a question which can only be solved by Dijkstra is waste of time. However as a follow you can be asked and so knowing Dijkstra, Prims, Kruskal is good. Again didn't bother too much.
DP - This is my weakest point and I have never got it and still don't get it. I always do recursion with memo. So learnt as much as I can but again this was like toss of coin. I am not sure if people ask DP. I mean question which can be solved only with DP. FB told me BTW they don't ask DP. Anyway if I get 2 DP question it's bad luck and I make peace with it. This is just not my forte.
Now here comes leetcode. Did 150 question mostly tricky ones like sliding window, monotonic stack, PQ etc.

Phone screen time and getting nervous. Why I get nervous before G interview while I was so chilled for FB. No clue. But I know this is not good. So try to relax and feel confident.

Phone round: All the hard work on BT helped. Again I didn't see the question before but since I have solved all BT traversal questions involving horizontal distance I approached it like that. I keep talking within my interview. Realized initial solution was not going from level 0 to level++. Fixed that. Solved it in a sub optimal way using recursion. Interviewer was little suprised that I used DFS as BFS was easy. But I like recursion more. I need to sort nodes on level left to right but figured out I need a stable sort. Told interviewer that I do not know if Collections.sort is stable or not but I know merge sort is stable and we can implement merge sort if required. BTW, Collections.sort is stable. Interviewer told it's ok. But I was using TreeMap to keep horizontal distance in ascending order. TreeMap == log(N). Changed it to HashMap and used two variables min and max key to traverse the HashMap. Interview asked why you need both, I agreed we just need min and here comes optimal solution. I like this kind of interview. This means I performed well and was able to give a sub optimal (not brute force) solution and arrive at optimal solution with some help. I do knew the complexity etc. I think it went well.

After 1 week - recruiter called and after chasing my interviewer to submit feedback told me that I was going to next round. Recruiter change here. New recruiter comes in. I did all my study and setup loop in a week's time. In fact I read more. And I was having dreams of data structures and algorithms. I think 10 week was little more. I think 6-8 weeks is enough to prepare. This recruiter was nice and told me little things that I need to improve (where I failed before). Nothing more than that. Basically it was knowing what data structure to apply (identify them) and do not ask for too many hints.

In 1 week I just focussed on what I have already learned. Looked at LC hard questions and only hard ones and solved them.

It's interview day. G recruiters told me what to expect in each round and wished me luck. Recruiter asked me to get back after interview regarding what I think about the interviews.

Round 1 - Googleyness. Interviewer was clear this is not a coding round. Again I do not know what these rounds are about but given my experience (I was told by recruiter you need to ace this as you have lot of experience) I was able to talk about my failures, things I care, social values etc. I was honest and truly me. I also talked about how others have helped me making me successful and how fortunate I am to work with so many smart people. I really don't know how it went. I got all positive vibes. I will be surprised if I fail this round. But again I am not here to judge my performance.

Round 2 - Coding. I was relaxed after Round 1. This question threw me off. Threw me off because it was a very easy question and I expected a difficult one. It was knowing array data structure (BTW I have to guess that array is best suited to represent this), various ways to traverse it (row wise, column wise, diagonally and anti diagonally). And apply set of rules with some precedence. There were tons of edge cases and I handled them well. I wrote clean code but I was traversing the array 1 time extra which I talked about. Again optimized it and all edge cases were passing in first code itself. Interviewer seemed happy but I am not sure. After interview I looked on the web to see was this some kind of trick question or what and did I miss anything. It doesn't seem like that. For more curious eyes it was a game board with various states and I was asked to evaluate game state (has someone won, game is still on or it's a tie). If the intent was to find if I can handle all edge cases and apply the precedence rule, I think I aced it. But again not sure. I become more worried when I get an easy question. And I haven't found this in LC.

Round 3 - Coding. Here comes Google. A difficult graph question. Now again difficulty is all relative. But this was a Google level difficult question. BTW, it was an indirect graph question. Now how I faltered. Graphs are my favorite and DFS is one I like. And I thought let me do BFS. This was a DFS question as doing it BFS was difficult (involved topological sorting). I realized this only after writing code and was able to tell this. Also mentioned that we need to do DFS. But I lost time. This is where I liked my interviewer (unlike FB where, "Ok you have 2 minutes correct your code"). Interviewer was kind to tell me that since I have 15 minutes break between this interview and next one, I can take additional 5 minutes and no more than that. I started typing hard and was honest to tell the interviewer that I am little nervous and so some help will be appreciated. I got minor help and was able to come out with a decent DFS structure. However no time to test etc. as we ran out of time. I did get some more time to ask questions which I did. I didn't like this interview. Again not that I was not able to prove anything. Interviewer got lot of data point about my problem solving, knowing graph, different traversal etc. But I should have done DFS in the first place. Anyways nothing much I can change here. I don't think it should be no hire but definitely not a solid hire. I call it opportunity lost.

Round 4 - System Design. My forte. But now I am thrown a curveball. This is no design question but rather a real life problem to solve on an already built distributed system. I have to change my strategy and expectation and in real time. I held myself back. Again asked lot of clarifying question. The answer was, "How does that change what you will do?". Ok, so need to explain ground up what I am thinking. Asked how my strategy will change if the API call is only POST or GET too. Talked about lot of approaches and their pros/cons, tradeoffs. What are strategies and how they change depending on if it is a tier-1 service or not. I got into groove in few minutes and then explained it well. I believe interviewer was happy and he kept mentioning good and other words.

Round 5 - Coding. I am tired by now and exhausted. Got an extremely hard file manipulation problem. Never seen it before but later found in LC hard. It took me 5 minutes to just understand the problem. Then wrote code and realized it is not working as expected. But then fixed it and verified it working for all the cases. Solution was optimal except that same buffer could have been reused which I pointed (didn't change code for that as Interviewer was happy with that). There was an ugly while(true) loop which I was not happy about but interviewer mentioned it is an interview and it is fine to realize this. I think this went well and I did well. This was also a very difficult question (at least for me). There were also some unneccessary parameters in some helper method to confuse people. Anyways was relaxed.

Honestly this was the best G interview for me. I faltered only 1 and I do not think I faltered it so badly. In my previous encounters I faltered 2 very badly and 1 was average. I have always enjoyed G interview and that is because they make me think and apply what I have learnt. I am not super hopeful of making it but wanted to share my experience because this community has helped me a lot.

UPDATE 1: Lot of question on location. Google interviews are difficult irrespective of location. They have same hiring bar across. For this interview I was interviewed by all folks in Mountain View but that was because I was told there is currently no opening at my location (it is in US) but recruiter is hopeful positions will open up soon hopefully. So that is one barrier as I am not willing to relocate because of various reasons. But I am not worried about it (yet).
For Googleynes round, you just need to be yourself and share from your experience. I worked at Amazon for a long time and prior to that Microsoft (for long time too), so knowing Amazon leadership principles and experience at MSFT helps answering these questions. For these questions you think of a real life example from past and use STAR format to discuss this.
And yes I have worked in lot of FAANG and branded companies. I would like to work for Google but not at the expense of getting a lowball offer or not a choice of my work/place etc. There is lot of factor that goes in before accpeting an offer. And I am pretty happy and doing good at my current company. And both FB and Google recruiter called me almost same time 6 months back and hence I tried both. FB interview is also not easy and gives a good amount of confidence.
Another thing is that if you are getting anxious about delay in company getting back post your interview, always follow up with your recruiter. Your recruiter is the best person to tell you what's going on.

Comments (30)