Friday, August 7, 2020

Google | L3 | Bangalore | July 2020 [Offer]

Original post: Link

 Experience: 2 years

Position: L3 (Software Engineer)
Location: Bangalore, India
Offer Date: July, 2020

I would like to give huge thanks to Leetcode and the community. Without Leetcode and the community's help, this offer simply would have been less likely.

I was contacted by the Google recruiter around last week of March through LinkedIn. I got a call from the recruiter around April first week to begin with the interview process. Since I was completely out of touch, I asked for a month time to prepare for the telephonic interview. However the recruiter gave me 2 weeks of time to prepare for the telephonic round, and told that he will give me 1 month extra time to prepare for the onsite rounds once the telephonic round is cleared.

Preparation for telephonic round
The recruiter shared the bunch of resources and guides to prepare for the coding interviews. Before this, I was very inactive in Leetcode and I used to sporadically participate in the Leetcode's weekly contests. After the call with recruiter, I started prepping more aggressively in Leetcode for the next 2 weeks for my telephonic interview. I solved roughly around 125 problems (25 easy, 80 medium, 20 hard) in the 2 weeks time, covering the most common topics like Trees, Graphs, DP, arrays, binary search, etc.

I have had the access to my friend's premium Leetcode account, where I mostly practiced the Google filtered medium-hard level problems. I also completed all the Google phone interview mock interviews from the premium account. I also managed to solve most of the problems from the featured 'Get well prepared for Google Interview' explore card available in Leetcode premium. I was practicing writing code in Google Doc, which really helped me simulate the real interview process.

Interview Process

Telephonic Interview (45 mins)

The interview was scheduled to happen in the mid week of April, but it got rescheduled twice, firstly the interviewer did not appear, and the second time the interviewer mentioned there was lot of noise in his place, and asked to reschedule the interview. Finally, the interview was scheduled for the last week of April.

The interviewer asked me quite straight forward easy-medium array problem based on the binary search. The problem was quite similar to this problem.
https://leetcode.com/discuss/interview-question/algorithms/124724/facebook-onsite-count-occurrences-of-a-number-in-a-sorted-array

There were two parts of the problem, the first part being just the straight forward implementation, while the second part requiring the binary search to solve.

I solved both the parts of the problem quickly, along with the dry run of some examples and explanation in around ~30 minutes. Then the interviewer asked me the big O complexity for both the solutions and asked me to think of some test cases. I wrote down around 10 different test scenarios for the problem, along with their expected output. We were still left with roughly around ~5 minutes, I asked him a few questions.

Virtual Onsite Interviews

After about an week, I followed up with my recruiter regarding the feedback of my telephonic round, and the recruiter told me that the feedback is not yet updated in the system and will let me know once the feedback is updated. Almost after a month (around 3rd week of May), I got a call from my recruiter saying that I have cleared the telephonic round and they are heading towards my virtual onsite interviews. He briefed me about the virtual interview process and asked me how much time I would require to prepare, so I asked him for a month time to prepare. The onsite interviews were scheduled for mid week of june. He shared few resources and tips to prepare for the interview.

Preparation for Virtual Onsite Interviews

The preparation for the onsite interviews were almost similar to that of the telephonic round, except that I had more time to prepare and I could solve lot of problems. I started participating actively in the Leetcode's weekly contests and up solve the problems from the past contests which I had missed. I also started participating in the Leetcode's monthly challenges.

I solved roughly around ~300 problems from my non-premium account, which consists roughly around 30 easy, 200 mediums, and 70 hard problems covering most of the important topics like Arrays, graphs, trees, DP, greedy, recursion, binary search etc. Apart from these, I also completed all the Google Onsite Interview mock interviews from my friend's premium account. I completed all the problems from the featured 'Get well prepared for Google Interview' explore card available in Leetcode premium. I use to write the code in Google doc, initially it was tough but after writing a lot of codes in doc, it became cakewalk and and most of them would get a clean AC verdict when copied and pasted to the Leetcode's beautiful editor!

Technical interview 1(45 mins)

The first problem was based on the binary tree, and the difficulty of the problem was Medium. I spent around 5 minutes to understand and rephrase the problem, and after brainstorming the next 5 minutes, I came up with an approach and shared it to the interviewer. He agreed upon the approach, and asked me to code. I spent around 15 minutes (too long) to code the solution. I walked through the code with the sample inputs and started looking for the off-by-one-errors and the other bugs. The code was working fine and the interviewer moved on to the next problem.

The second problem was also based on the binary tree, it was quite similar to this Leetcode problem.
https://leetcode.com/problems/serialize-and-deserialize-binary-tree/

I quickly came up with the solution in < 5 mins, shared with the interviewer, he agreed and asked me to code. I coded it up in around 10 mins, and walked through some same inputs and it worked! We were left with roughly 5 mins, and I asked a few questions to him related to Google.

The interview ended with the interviewer telling me that I did a good job and wished me good luck for the other interviews.

Technical interview 2(45 mins)

The first problem was quite similar to this Leetcode problem.
https://leetcode.com/problems/perfect-squares/

I gave him 2-3 approaches to this problem, and he asked me to code the dynamic programming based approach. I quickly coded up the solution, and we were done with this problem within 20 minutes of the interview.

The second problem (not available in leetcode) was about designing and implementing few methods in a class, the difficulty I'd say was medium, and it required the knowledge of heap / priority queue to solve it. I discussed the priority queue based approach with him, he agreed and I quickly coded up the solution. He asked a few questions or follow ups which I was able to answer pretty quickly as well.

We were left with 5 minutes, I asked him a few questions and I could clearly see that the interviewer was really impressed. This was my best round so far, and I heard from my recruiter that I got a very good feedback from the interviewer.

Technical interview 3(45 mins)

The problem was based on the binary tree, and it was quite similar to this Leetcode problem.
https://leetcode.com/problems/flip-equivalent-binary-trees/

I discussed the approach with the interviewer, he agreed and asked me to code it. I quickly coded it up in < 5 mins, and while I was looking for off-by-one-errors, I found a small case which was not handled in the code, I fixed it. Then we walked through the code for a few sample inputs, and it worked. He asked me if there are any optimization areas in the code, I did a few optimizations (case eliminations), although the time complexity would not change. The interviewer said the solution is correct and optimal, and asked me the time complexity. I struggled a bit while answering the time complexity, because it was not quite trivial, eventually with some help from the interviewer, I was able to come up with the correct time complexity of the code.

Since we were left with 25 minutes, I was expecting another question, but the interviewer told that he would be asking few follow ups on the same question. He told that the solution I have provided is the most optimal solution in terms of Algorithmic view, and we can not further optimize it, but if we have to solve this same problem for large scale systems, then we can not afford to have O(N^2) solution, so he asked me to come up with something approximate / heuristic solution which is close to the correct answer and would run in a linear time.

I initially proposed a very basic random approximate solution, which would run in linear time but it was not very accurate. He asked me to optimize the accuracy, I proposed another solution, he asked me to further optimize it, like this way, I gave him around 6-7 different approximate based solutions, after continuous iterations. He finally said that we have reached the accuracy to very good extent, and this should work for most of the scenarios, and we need not optimize it further. We were left with some time, and I asked a few questions to him. The interview ended 5 minutes early.

Technical interview 4(45 mins)

The first problem was based on the binary tree. There is a binary tree root pointer given, we need to check if for every node in the tree, the absolute difference between the sum of all the nodes in the left sub tree and the sum of all the nodes in the right sub tree satisfies some given condition.

I shared the linear O(n) recursive solution with him, and he agreed with that approach. I coded the solution and we walked through the code for a few sample inputs, and it worked. He also asked a few counter questions related to the code, to which I was able to answer all of them. The interviewer asked if there are some optimizations possible in the code, I did a few obvious optimizations (case eliminations), but that would still not change the time complexity. He agreed and we moved on to the next problem.

The second problem was quite similar to this Leetcode problem, initially the scope of the problem was to tell whether its possible to reorganize or not.
https://leetcode.com/problems/reorganize-string/

I did brainstorming for some time, and was able to come up with the linear O(n) solution. I shared my approach with him, and he raised a few counter questions on my approach, but I was able to resolve them by trying out the approach on some examples, he agreed and asked me to code it. I coded up the solution in ~7-8 mins, we walked through few sample inputs, look out for off-by-bit errors, everything was fine.

Next, he asked the follow up for the above problem, that now we also want to return one of the possible answer if the answer exists. I discussed him the linked list based approach to construct one of the possible answers, he agreed. Although, he did not ask me to write a code for it. We were still left with some time, so I asked him a few questions on his recent projects in Google. This was also one of the best rounds I have had so far.

Non technical interview

After a few days, I got a call from my recruiter saying that I have received very good feedback from my coding interviews, and the next round is the Googleyness round. He shared some useful docs and guides to prepare for it. I asked for 1 week of time to prepare it as I really wanted to crush it.

Preparation for Googleyness

Firstly I went through the doc that my recruiter shared to me, and I watched a lot of videos in YouTube regarding the Googleyness interview, some of the important ones are-
https://www.youtube.com/watch?v=uPjeKSDuoGw
https://www.youtube.com/watch?v=TWFs3dxfiOc

Firstly, I went through the top 10 core values of Google. Then I started preparing for the behavioral and the hypothetical (situation) based problems which are commonly asked in the interviews.

For the behavioral part, I prepared some nice stories based on my experiences for the below questions:

  1. Tell me about a time when you contributed to the team's success.
  2. Tell me about a time when you fail to deliver the project, and what did you learn from it?
  3. Tell me about a time when you demonstrated the leadership skills, when you were not officially the leader.
  4. Tell me about a time when you overcome a challenge.
  5. Tell me about a time when you pushed yourself outside of your comfort zone.

It's good to have the pre-written nice stories around (common behavioral categories) and make sure you highlight the qualities they are looking for, in your stories. Some of the common behavioral categories are listed below-

  1. Teamwork Oriented
  2. Problem Solving
  3. Initiative/Leadership
  4. Interpersonal Skills
  5. Challenge/Stress/Pressure

I prepared all of my stories based on the STAR principle (Situation, Task, Action, Result).
https://www.themuse.com/advice/star-interview-method

For the preparation of hypothetical / situation based questions, I mostly referred to the YouTube videos which I mentioned above.

Googleyness interview (45 mins)

The interview started with the introduction, followed by few behavioral and the hypothetical / situation based questions similar to below -

  1. Tell me about the differences you find between the projects you did in your college time vs the projects you have done on your first job.
  2. Tell me about a time when there was a difference in opinion between you and your team member.
  3. Tell me about a time when you had to switch to the different project amidst your ongoing project.
  4. Tell me about a time when you overcome a challenge.
  5. How will you react if your manager takes all credits for all the work you've done?
  6. Imagine there are two products A and B, if both goes down at the same time, which one you will prioritize? What are the factors you will consider?

There were also a couple of follow up questions to some of the questions. Overall, the round went pretty well than I had expected. The interview ended on a positive note. ^_^

Result

After a few days, I got a call from my recruiter saying that I have received slightly above average feedback from my googleyness round, and they are moving ahead for the Hiring Committee round. The recruiter asked for the internal references from the Googler whom I know. I got a really really strong internal reference from my friends who are working at Google. After a few days, I got a call from recruiter saying that the HC has requested for 1 more additional coding interview, as I was asked many questions from one particular topic i.e Binary Tree. The recruiter told me to practice the hard problems, so I took 1 week of time for preparation, and practiced the Googled filtered hard problems from Leetcode. I solved around ~40-50 hard problems in 1 week of time, and revised some of the problems which I solved in the past during the onsite round preparations.

Technical interview 5(45 mins)

The problem was based on the Graph theory, and quite similar to this below problem.
https://www.careercup.com/question?id=5744699292778496

The problem was definitely hard, and it took me quite a while to come up with the most optimal approach. I started with the brute force approach, to check and find every candidate cycle, which contains the target node, and find the one with the smallest length.

After thinking for a while, the optimal solution clicked on my mind, and I shared the approach with the interviewer, he agreed and asked me to code it up. I took around ~15 minutes to code the solution, and explain it to him, with some sample inputs, and while we were walking through the code, I found a major bug in the code. I quickly fixed it as soon as I discovered it, and then we again walked through the code, and this time it worked. The interviewer agreed, and asked for the time and space complexity of the solution. As I spent a lot of time while explaining the approach, so we were hardly left with few minutes, so he could not ask me second question. He asked me if I have any questions, so I quickly asked him one question related to the Google.

Result

After 2 days, I got a call from my recruiter that the hiring committee has approved my packet, and that I have received very positive feedback from my last round. Then he told me that the next is Offer Review Committee, and asked few details regarding my current compensation, any other offers etc. The Offer Review Committee approved the packet, and I finally received the offer letter in my hand, a day before my birthday (perhaps the best birthday gift ever ^_^)

Time Management Strategy

The time management strategy that I followed was,

  1. Solve the first problem within 20 minutes including code.
  2. Solve the second problem within next 20 minutes including code.
  3. Five minutes buffer for the general discussions and Q/A.

Break down for 20 minutes to solve the problem,

  1. 5 minutes to understand the problem and clarify all the doubts
  2. 7-8 minutes to come up with the optimal solution.
  3. 7-8 minutes to code the solution.

I'd advice to take some extra time but come up with the most optimal solution you can, in the first shot, rather than spending time on the non-optimal or brute force approach, as Google will focus mostly on the optimal solutions.

Advice and suggestions

Apart from the intense preparations before the interview, one thing that really really helped me and I would really like to suggest is to do some meditation before your interview, so as to relax your mind, which will increase the productivity of your brain during the interview.

I use to listen to this below 12 mins coding interview meditation, approximately half hour before my interview which does the positive visualization exercise where we visualize the day of the successful onsite interviews and it really helps to maintain positivity throughout the interview.

https://www.interviewcake.com/coding-interview-meditation
https://www.interviewcake.com/24-hours-before-onsite-whiteboard-coding-interview

Happy Coding. Good luck!

No comments:

Post a Comment

My Journey from a Tier-3 College to Microsoft, Google, and Meta: Lessons Learned

Original post: Link   Time to give back to community. Went through couple of post myself and got inspired and belief that cracking FAANG is ...