Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
22,262 views
All interview experiences for Google  can be found using the tag "google_interview_experiences" in the search bar.

Here is the link :https://www.desiqna.in/tag/google_interview_experiences
in Interview-Experiences by
edited by | 22,262 views

94 Answers

0 like 0 dislike
Best answer

All interview experiences for Google  can be found using the tag "google_interview_experiences" in the search bar.

Here is the link :https://www.desiqna.in/tag/google_interview_experiences

by Expert (107,550 points)
0 like 0 dislike

 

Google | L3 | NYC | Nov 2020 [Offer]

Status:- MS CS Top 20 CS school
Work Ex:- 2 years as SWE at a Big Bank + 1 FB internship
Date:- Nov 2020

 

I would like to share my experience of Google Onsite

 

Interviewed for L3/L4 role at Google.

 

Received an approval from the hiring committee for L3 role. Waiting for team match

 

I am obviously not going to share the exact interview questions due to NDA

 

Background

 

I did my bachelor’s in computer science from India (2017 grad), came to the US with 2 years of work experience and did my master’s in computer science (Aug 2019- Dec 2020).

 

This was my first time applying to Google.

 

Preparation
I did around 580 LC problems (130 easy, 341 medium, 112 hard)

 

Phone Screen
Very easy problem about constructing a palindrome. The logic is pretty easy to spot. Solved this in 20 min, the remaining time was spent on another question which is like an array LC medium

 

Virtual Onsite
4 rounds of coding + 1 behavioural

 

Except for the last round, literally none of the questions I encountered were even remotely close to what I have solved in LC. But they used LC concepts quite a lot

 

Coding 1:- Really tricky matrix problem, which i converted into a graph problem and solved.
Coding 2 :- Very interesting implementation of tournament problem involving probabilities. I did the first part, but struggled implementing the second part
Coding 3:- Regex matching + converstion of string to regex string problem. Solved on time
Coding 4:- Similar to Knight dialer question, but definitely not the same. Solved with time to spare

 

Feedback
Hiring committee approved me for L3.
Recrutier said my coding, clarifying questions, communication was good.
I took hint in one of the rounds and thats the main reason for downlevelling.

 

Team Match
Heard L3 headcount in US offices is low, Really crossing my fingers.
It would really suck if i came this close but didnt match with team. If there are any hiring managers who see this post, please comment below if you have availability in any US offices

by Expert (107,550 points)
0 like 0 dislike

Google | L4 | Bengaluru | Aug 2021 [Reject]

Note: I will not be able to share the exact questions but will share a gist of my experience and few tips as per my experience.
Asterisks are the major feedbacks that I received and I have explained those at the end.
PS: Please do not forget to upvote if you think this post has helped you.

 

Background: 5 years of experience with BE in CSE from tier-2 college. I have zero experience in competitive programming and had not done even a single leetcode problem while applying to Google. I was contacted by a recruiter in LinkedIn and I took around two weeks time before I decided to reply the recruiter back. By this two weeks, I was able to get two offers and developed some confidence. Recruiter replied me back immediately and I got myself a screening round scheduled within a week time.

 

Round 1: 3rd week of July
Rest of the rounds: 1st week of August
 

 

Round 1 (Telephonic screening):
Recruiter was very friendly. After introduction, he jumped into a question. The question was kind of application based but I could figure out the pattern immediately and it was a tree traversal. I explained the DFS approach since it was more suitable and defended the approach with reasoning. The interviewer was fully satisfied and I was asked to code which I did and dry ran the solution.
As a follow up question, he tweaked few things in the question and for this BFS suited the most. I almost coded the solution but I couldnt exactly dry run with inputs because of the time limit. Interviewer told it looks fine and I am in the right direction as we ran out of time. I asked him some questions about the work in Google and the interview ended.

Feedback: Very strong in data structure, communication and the test cases. Further input was to improve speed and also think of alternate solutions.



All things were happening very quickly. I was casually looking for change and as my luck had it, I had few offers and I was suddenly serving notice. I wasnt fully prepared for a company like Google, so I was very casual about Google till this point. But this positive feedback gave me hopes of getting into Google and as I started dreaming of getting into Google, I started working towards achieving it in the very short time I had. I took two weeks time before I scheduled my next set of interviews. This was the max I could afford since I was close to end of my notice. This is the moment where I started solving problems in leetcode (I know I am very late). I realised I could learn more algorithms/patterns if I watch videos on YouTube than solving the problems on my own. This was more suited since I had only 2 weeks. I solved close to 60 problems on leetcode (mostly easy ones) and I went through solutions for close to 100 medium problems of leetcode on YouTube.
 

Round 2 (Virtual Onsite 1):
Interviwer straight away jumped into the doc that Google shares. For some technical reasons, he couldnt start the interview in the doc link shared and he decided to share the doc link of his own. It was all silence till he shared the document and he neither introduced himself nor asked me to introduce myself. It was a first such situation and strange one for me. At first I thought of filling the silence by talking something or introducing myself but decided to stay quiet to avoid something stupid coming from my mouth or getting into a trap by digging hole myself. Thats the least thing one wants in Google interview. (And I am not a great conversation starter either though my communication skills are good)
The problem was something on file structures and I could notice the pattern easily. Any tree traversal would have worked for this problem. After explaining that, I went ahead and coded kind of level order traversal solution which I thought was most suited. Though I couldnt put the right words for explaining time complexity in the beginning*, I finally wrote it in a right way with right explanations.
The follow up question was also on similar lines and I managed to code the solution for that as well. We spoke about test cases for validation of the given question and the question was such that I could cover all the negative test cases in one generic scenario (Test case was that the given structure should not have a cycle). He asked me to give the specific examples and I gave two cases but missed the one which he had in his mind*.
This round went really well if you ask me*.
 

 

Round 3 (Virtual Onsite 2):
This interview started with introduction of each other and then the interviewer jumped into the problem. The problem given here was one of the best real world application I came across and it was something related to receiver and transmitters placed at different locations and had to figure out certain things. At first I freaked out to be frank, but as I understood the question, it looked doable. The main problem I had here was that the interviewer was not giving me the example input. He asked me to define in whatever way I want and I had some hard time in figuring out how I could take the inputs and decide the structure of it. Finally I came up with the input format, explained him my solution and coded a recursive approach for it.
As a follow up and custom, he added some more constraints and I was able to explain the solution for that as well. There was no time left to code for this since we were already overtime by 15mins*.
I wasnt very satisfied with this round but it dint go bad either.
 

 

Round 4 (Virtual Onsite 3):
Interviwer was the friendliest of all and asked me how the previous rounds went and some general stuffs. He gave me a math related programming question which is my weakest area. I had to find some kind of relation between coordinates and figure out certain things. I was struggling a bit for naive approach and with one hint from interviewer, I could code the naive approach. After I finished up the coding, he told me to find out a very minor bug in the code and I couldnt figure it out. He later pointed that I had declared a list inside the method but that was supposed to be declared at class level*. This solution took O(n^4) and next obvious thing was to optimize it.
I came up with another approach which reduced the time to O(n^2) and wrote a pseudo code for this. He asked me to quickly dry run and it worked fine. In this round as well we overshot the time and it took around 1hr 10mins*.
 

 

Fortunately or unfortunately, all the questions I was asked were application based questions and there was not even a single typical programming question. After this round, though it all dint go amazing, I was content that I was able to give solutions for the questions asked and I had some hopes. Out of curiosity, I decided to contact my recruiter to know the feedback even though one more round (Googlyness) was scheduled the next day. "You have got a strong feedback for data structures, problem solving, recognising the patterns and communication." These were sort of exact words from the recruiter and I was already imagining working at Google. "Improvements are required in test cases (as per round 2 feedback), efficacy and speed. Because you took more time in coming up with the solution in last 2 rounds, the interviewers recommend that you can be considered for L3 and not L4. For the experience you have, L3 would not be a justice to you. So as I see, it is a negative and we will not be able to move ahead with your candidature". As she uttered these words, I went numb for a second and couldnt understand what was happening. It took some time for me to come back to reality and then I asked for the detailed feedbacks again. The recruiter went ahead and cancelled the Googlyness round that was scheduled the next day.

 

Some more details on onsite rounds feedback:
Round 1:

 

  • Good in DS and Algo. Could recognise pattern and could provide solutions for both the questions.
  • I was not able to explain the time complexity properly. Even though I agree I struggled initially with the wordings because of the way the question was, I could write the complexity in a detaiiled way with what each variable in the time complexity meant
  • Did not give all the test cases. One test case was missed by me though it was part of the generic test case I gave.
  • The feedback in this interiew was leaning no hire. I for no sure got the reason for this from the feedback I got and I think this was very harsh

 

Round 2:

 

  • Could come up with the recursive solution and could code.
  • Code could have been a bit better and neat
  • Took more time
  • The feedback here was fit for L3 or no hire

 

Round 3:

 

  • Could understand the hint immediately and came up with the approach
  • Had a bug in the code (the list declaration I was talking about)
  • Wasnt fast
  • Feedback same as round 2, fit for L3 or no hire

 

 

My two cents based on the experience I had:

 

  • The parameters on which Google judge is way different compared to other companies
  • The interview process is very meticulous, detail oriented. Every thing counts. Just giving the (optimal) solution is not good enough
  • Time management is very very very important for Google interviews and this can be achieved only by more and more practice I believe. (This is the biggest weakness of mine and I have lost couple of other opportunities as well because of this)
  • Thinking of alterante solution is very important in Google interviews. Giving two to three solutions and then explaining the pros and cons would really help
  • Always speak out loud, no matter what logic you are thinking. This helps a lot and interviewer will be able to help you
  • What I realised with many interview experiences is that no doubt one should have prepared a lot for the interview with determination and consistency, but luck plays a very major role. Luck is the father of all.

 

 

Being an average student during engineering to giving an attempt at Google has been one amazing journey. There were days I doubted of even getting the call from Google, but now I am confident that with some more hard work and determination, I will be able to make it one day. Rejections are part of life and while I definitely regret missing this opportunity, I am excited for what I have in hand currently.

 

Enjoy life, we all will achieve what we want one fine day. Cheers!

by Expert (107,550 points)
0 like 0 dislike

Google L4/L5 (Feb. 2020) [REJECT]*

 

I applied online and a recruiter reached out and scheduled a call. She liked me very much and I was able to skip the phone screen and went directly to on-site interview in Mountain view back in Feb. 2020 (just before COVID-19)

 

On-site*

 

  1. first round was behavioural
  2. graph related problem where I was given a set of rules and had to determine the maximum number of moves i could make
  3. n-ary tree traversal problem
  4. string manipulation
  5. embedded specific problem, design a timer queue

 

overall I think I did okay but I was unable to finish the graph problem in time (had the right algo but could not code it) and n-ary tree solution was not optimal and had some bugs. A month later recruiter reached out and said they are not moving forward.

by Expert (107,550 points)
0 like 0 dislike

Google | L3 | Paris | October 2019 [Rejected]

After some thought, I decided that I should kick off 2020 by writing this post. As you can see I interviewed a few months ago, but I remember scouring these Interview Experience posts and lamenting the fact that I couldnt seem to find that many posts about the experience in mainland europe. Even though I was rejected, I hope this could prove helpful to someone.

 

Background: 2YOE as a Software Engineer, did my interview in Java, although I do not use it for work.

 

I did a single phone screen early 2019 with Google and completely tanked it. I had a 2D matrix question for my phone screen (hill height) that I of course couldnt solve as I had never even practiced that type of question before. My recruiter called me like 1 hour after the phone screen, thanked me for my time, and said they would reach out in 12 months for me to re-interview. I thought, I blew it, I will probably never hear from Google again. In EXACTLY six months they contacted me, and I frantically started preparing again, kicking myself for not prepping for the entire duration of the previous six months. As of this second contact point, I did almost every single question in CTCI to start, then did Leetcode (104 questions).

 

I tried to delay my phone screen a bit, but was encouraged to keep things moving by the two recruiters I dealt with (They were such awesome people, I feel privileged to have had such recruiters, as I've read some horror stories online! They were so responsive and made the process so much easier) I had two phone screens (1 hour and another lasting 45 mins) at two separate times and in both cases came to an optimal solution.

 

About 3 months after I first started prep I was On-Site at the Paris Office, my very first On Site interview ever of this nature.

 

To the best of my memory here is what I was asked!

 

  1. output a beep or some type of signal every time your method finds a match to some string in a non-stop stream of text. (Think about a Google Home, listening for "Okay Google") The optimal solution would be the use the KMP String Matching Algorithm, but I could not code it perfectly from scratch.
  2. I really can't remember exaclty what I had to do here, but it was an interval question, similar to this type of question https://leetcode.com/problems/non-overlapping-intervals/ I did a solution, but there was a bug which I had no time to fix.
  3. Googleyness and Leadership - all the questions they asked here are the standard types you see when you check online, e.g: * Tell me about a time you took a risk and failed. * Tell me a time when you have hard time working with any colleagues

 

LUNCH - Spoke at length with an engineer about their background in computer science and their role, and they also gave me a tour of the office. (You can see the Eiffel Tower from one of the coffee rooms! Beautiful!)

 

  1. When i came back from lunch and I heard this question I was pretty happy since I had practiced so many of these types of questions. It was this type of question: https://leetcode.com/problems/valid-parenthesis-string/. Solved it with no problem :)
  2. This was related to TreeMap. I had a sinking feeling when I heard this, because (I didnt prepare TreeMap, and also never saw TreeMap in class) Still I answered the question to the best of my knowledge, that related to BSTs. I had to do several traversals of this TreeMap.

 

I have a full time job so prepping for 3 months was very intense. I didn't go out, didnt do anything except solve questions as soon as I got home from work. I had a LOT to cover and practice, especially since I do not code in Java. I got to a point where I could solve most LC easy in 5 mins, but some mediums still took me 30 mins plus. Next time I will start my prep earlier, to give myself enough time to practice even more questions and cover more topics!

 

I feel like making it On Site was a personal achievement in and of itself, as I never even entertained the thought of interviewing for Google, let alone being on site! I don't have friends working in Big N companies, or know developers who have been through interviewing with Big N, nor even heard of Leetcode. It felt like a world that had no place for me, and I am really grateful to Google for opening this door. Prepping hard to ace it next time!

by Expert (107,550 points)
0 like 0 dislike

Google | SWE 2020 | Rejected

5 Rounds full day interview

 

  1.  

    Give an array of boxes with size N+1 with its weight is from 1->N. The final element is empty marked with an 0. Sort the boxes from lightest to heaviest where you can only move 1 box at a time to the empty slot. You should do it in o(N) time.

     

  2.  

    Get maximum sum from array of coin, if you can only pick k coins from either side of the the array.

     

  3.  

    Given a binary tree in array form, where each element is <value, parent index>, where remove the subtree given the parent index.

     

  4.  

    Remove an array of substring from document given its starting position.

     

  5.  

    behaviorial

     

 

I was rejected because my code wasn't optimized. I suspect it's just a random reason given to candidates.

by Expert (107,550 points)
0 like 0 dislike

Google | L4 | India | April 2021 [Offer]

About me:

 

YOE: 2+
Position: SE3, with a product company
Education: M.E. (Computer Science)
Location: India

 

Process:

 

I got contacted by a Google APAC recruiter in December 2020. She was extremely cordial.
We had a call, where we discussed my experience, education, projects etc.
She also gave me a detailed walk through of the hiring process.

 

Scheduled my Telephonic interview in Jan.

 

Signed NDA, so I cannot give out the questions, but will cover the broad areas.

 

Telephonic Round:

 

I was attending an interview for the first time since my placements ~4 years back.
I was quite nervous :p

 

Two questions were asked (LC Medium), one from stream manipulation and the other was basically a sorting question with a little twist.

 

Solved both in the stiplulated time. Got a call from the recruiter in few hours, feedback was good and progressed to the onsites.

 

Onsite: (Virtual)

 

Post telephonic further processes were handled by Google India recruiter. He is extremely cordial too, very helpful. I scheduled my onsites, in March. (had to reschedule once in between, they are very flexible in this and won't mind, just let them know in advance)

 

I had 4 coding/problem solving rounds and 1 googlyness round. System design is not mandatory for <=L4. I opted for coding and not system design. All rounds as 45 mins.

 

All these questions had follow ups, I am combining them and covering the broad area.

 

Round 1> Questions based on text fitting on screen with a little twist. (LC M) greedy & follow-up bin search.

 

Round 2> Questions on sub-sequences and text. (LC M) coded sub-optimal approach, discussed optimal approch, could not code.

 

Round 3> handle large file of bytes. (Not in LC) Hard question.

 

Round 4> Googlyness round, questions were asked from past experiences. Important projects, handling unwarranted situations etc.

 

Round 5> Graph BFS. (LC M)

 

Round 3 was nullified because of logistical issues. Had to go through another coding round.

 

Round 6> (replacement for 3) A NP-Hard problem. Not the usual interview types. Discussed for a long time. Coded a very buggy solution.

 

Next day Recruiter called me and shared feedback. Feedback was not good for one round (Not a surprise!) but overall positive. So moving to HC. Shared a pitching doc(achievements, promotions, transcripts etc.), filled it out. You have to provide your highest degree transcripts if they are <3 years.

 

Recruiter also arranged a fit call with a HM, who was interested in my profile. This call is used to see whether your interest alligns with that of the team. Talked about projects, experience etc. detailed discussion on the projects the team is working on, had a few queries, got them cleared.

 

I was interested in the team, the HM too wanted to move ahead. So team mapping was done.

 

After ~2 weeks since my last interview, the recruiter called me and informed that HC has approved my packet for L4. He also explained me the benefits, insurance etc. Asked me about my expected comp, the next step from here would be comp committee and exec approvals. BTW, sometime people are rejected after HC as well

 

The updates got a bit delayed because of the flaring Covid situation, got the first offer in a couple of days, negotiated.
Revised offer rolled out next day, accepted.

 

=====================

 

Few learnings / observations :

 

Google or any company for that matter, is not looking for just smart people, they are looking out for smart people who can work in teams.
If someone is a great problem solver, but bad in explaining/conversing, it will be difficult for him/her.

 

Focus on DSA (No-Brainer) There is no winning strategy, what works for me, might not work for someone else.
Keep upsolving, quantity does not matter, quality does.
Enjoy solving the problems, dont go overboard and set daily targets, that said, try to keep continuity (I am very bad at this, so I suffer).
Leetcode premium helps. Dont go for any other paid content, enough free material is already available.

 

Please practice speaking out when you code.
From my experience as an interviewer, in pressure situations people tend to go mum, this will surely hurts chances. If I need some silent time, I tell the interviewer, "Can I think for a couple of minutes?"

 

Lead the conversation. Create the environment as if you are discussing something with your peer/senior, this lowers the pressure.

 

Specifically for FAANG, make it a habit to go to >90%ile in time when you are practicing in leetcode. They are very picky about optimality.

 

Try not taking hints as much possible, always dry test. If there are issues you should be the one finding them.

 

Google recruiters will allow you time to prepare, take the time. Sometimes the process might seem tedious and long, especially the many committees/approvals, but these committees are their to help them remove the false positives. The process usually goes for many months, dont lose your steam :D
For me the entire process (recruiter call to HC) took 4+ months.

 

Your recruiter will help you a lot through out the process.

 

Intellectual humility and comfort with ambiguity are traits Google looks out for.

 

For Google, its better to have a competitive offer in hand, often gives you an edge during comp discussions.

 

Note: Google is not interviewing on google docs lately. They ask your preferred lang at start of the process, and gives you a coder pad (Interview portal)
Similar to sublime/notepad++. No auto-completion, but takes care of indentation.

 

=====================

by Expert (107,550 points)
0 like 0 dislike

Google | Intern | Hyderabad/Banglore [Offer]

On campus Internship Opportunity.

 

Status: Undergraduate, B Tech, Computer Science
Type: Coding Round, 2 Rounds of Interview.

 

Coding Round

 

Duration : 1 hour
Number of Problems: 2

 

First Task
Given a string S of length n, consisting of only '0's and '1's, count the number of distinct decimal subsequences that can be generated from the given string. Print answer with mod 1e9 + 7.
Example:
S = "011"
Result = 3
Distinct Decimal Subsequences = {"0","1","11"}

 

Expected Time Complexity : O(N)
Comments

 

  • It is a modification of a famous problem, Distinct Subsequences.
  • We need to take care of leading zeroes(which is the tricky part)

 

Second Task
Given a N x M matrix. We have to find the minimum cost path to reach the first column to last column.
A path is defined as P1,P2,......Pm(one cell in each column). Cost of a path if defined as Max(P1.....Pm) - Min(P1....Pm).

 

Interesting Points

 

  1. I solved only 1 problem and got an interview call.
  2. Google doesn't disclose their shortlisting criteria. One student solved both the problems and didn't get an interview call.
  3. Your chance of getting an interview call depends on 3 criterias
    * Coding Round Performance
    * Resume
    * GPA in college

Interview

 

Interview was conducted on Google Meet and we had to code on Google Docs (all standard stuff).
Duration: 45 minutes

 

First Round
I was given a problem and had to come up with an efficient solution and code it.
Problem Statement
Given a tree which consists of 2 types of nodes, type 'A' and type 'B'. We had to modify the tree according to 2 rules->
* Remove all type 'B' nodes
* Join all type 'A' nodes to the nearest parent/ancesstor of type 'A'.
* Root node is guranteed to be of type 'A'.
Expected Time Complexity : O(n)

 

More

 

  • I was asked to refactor my code.
  • Round was wrapped with a quick discussion on time and space complexity.

 

Shortly After the first round, I got a call for my second round, 5 minutes prior only.

 

Second Round
Interview was conducted on Google Meet and we had to code on Google Docs (all standard stuff).
Duration: 45 minutes

 

Problem Statement
Find maximum subarray sum in an array given the condition that the first and last elements of the subarray are equal.
Example
A= { 1,1,2,-1,-3,2,1,}
Result = [1,........1] = 3.
Expected Time Complexity : O(n)

 

More

 

  • I had to come up with some edge cases.
  • We had a discussion on testing of code after that(tougher part of the interview).

 

COMMENTS

 

  • The problems were doable if you are into Competitive Programming.
  • The 2nd interview was targeted to test my coding style and do I write readable code or not.
  • Both the interviewers were asking a lot of questions about testing of codes, devise test cases and come up with some edge cases.

 

Final Result
After 4-5 hours I was informed about my offer.

by Expert (107,550 points)
0 like 0 dislike

Google | L3 | Seattle | August 2020 [Offer]

Status: 1 YOE as Data Scientist in a tech company, MS CS Top 20 CS grad school
Position: L3 SWE at Google
Location: Seattle/Kirkland, WA
Date: April-June 2020

 

Phone screen (1 round) :
We would like to design an alerting system for a server. The input to the system is error rates of the server over time.
[4,9,6,14,0,50,45,50,50,50,0,4,4]. This means the server had an error rate of 4% during time [0, 1), 9% during time [1, 2), 6% during the time [2, 3), and so on.

 

  •  

    Part 1: Write a program that returns True if and only if there exists some interval of interval_length seconds which includes target, time and where all error rates in the interval are greater than or equal to min error rate The input consists of an array of error rates, and the values for target time, interval length and min error_rate.
    Eg: target time=5, interval length=5,min error rate=45, returns true, interval [5,10) satisfies

     

  •  

    Part 2: Suppose that instead of interval_length and min_error_rate, you are given a threshold. Your program should return True if and only if there exists some interval containing target_time for which length(interval) min_error_rate(interval) >= threshold. The input consists of an array of error rates and the values for target_time and threshold.
    Example : target time: 6, threshold: 200, Returns true, interval (5, 10) has length 5 and minerror_rate 55, and 5* 55 > 250

     

 

Virtual Onsite (5 rounds):

 

  1.  

    Onsite Round 1
    Generate a candy crush board.
    Conditions:

     

    • No 3 same colored candies on the same row or column
    • There needs to be a valid move
    • Board should be random

     

    Note: Similar question here.

     

  2.  

    Onsite Round 2
    Write a function that takes a string, and counts the number of words in it, unless those words are enclosed in double quotes. Ex: "His name was "Major Tom"=3
    Note: Can’t use python split function

     

  3.  

    Onsite Round 3
    Find the top 'N' most chatty users by word count.
    Note: I don’t remember what it looked like but the chat logs had other details like time stamp, user name and such. Just needed basic parsing , using a hashmap to save number of words used and sort this list in the end.

     

  4.  

    Onsite Round 4
    Write a function which copies a part of an image to another location in the same image. given the height and width of the image, and set Color and getColor.

     

  5.  

    Onsite Round 5:
    Googleyness and Behavioral round:

     

  • How do you motivate team members?
  • Talk about a time when you went out of your way for a client or colleague.
  • How do you handle an ambiguos task/project given by your manager?
    Note: It's important to know what Googleyness means before this round, do your research. This guy is good, even for other companies [Dan Croiter] (
    )

 

 

Onsite ll (2 rounds):
To assess L4 fit

 

  1.  

    Given an array of length n, find the probability of reaching the last index if there is a dice with various probabilities to take the steps. Eg: a 6 sided die with probabilities of [0.1,0.1,0.1,0.2,0.2,0.3]
    Note: Closest approximation to the question. I think there's a knight's board probability question on leetcode with a similar concept here.

     

  2.  

    A binary tree can be expressed as a list of tuples of the form (N,L,R) where N identifies a node in the tree, and L and R identify the left and right children of that node, respectively. Assume that all node ids are positive integers. If either L or R are -1 , it signifies the lack of a left or right child. Given a list of nodes, as well as two node ids, write a function to return the path from node id to the another.
    Note: Not exactly the same question, but a similar one: here.

     

 

Result: Offer!! Link to compensation post

 

Prep:

 

  • Leetcode Premium was super helpful. Started off with the explore cards https://leetcode.com/explore/ on Apple, Google, Amazon and Facebook
  • 215 Questions solved in ~2.5ish months: 50 Easy /118 Medium /47 Hard (23% , 55% , 22%)
  • You can see the topics you solve the questions under on leetcode, make sure you cover good ground in all.

 

Tips:

 

  • Who you reach out to matters. I contacted a recruiter who I worked with about 1.5 years prior to then. The recruiter had switched roles but forwarded me to great bunch of recuiters who were amazing. It also helps to be super nice on emails, replying promptly and making it easy for them.
  • Team Match took quite long. Power through and keep at it!

 

Good luck, everyone!

by Expert (107,550 points)
0 like 0 dislike

Google | L4 | Kitchener, Canada [Offer]

Status: Industry Hire, MS CS (University Of Waterloo), 4 years of experience
Position: Software Engineer L4 at Google
Location: Kitchener, Ontario, Canada
Onsite date: First Week of January 2019

 

Technical phone screen (1 hour):

 

  • Algorithmic DP question and some Operating Systems Questions. (LC complexity: Easy/Medium)

 

Onsite (45 minutes long 5 rounds):

 

Round 1:

 

  • First round asked 3 questions, one easy and 2 medium. They were not exactly from LeetCode but you can find many similar question on Leetcode. I gave optimal solutions for all questions and wrote code for one easy and one medium problem. He didn't ask me to code last problem. All questions were related to each other and they involved hashing and sorting.

 

Round 2:

 

  • Math question. I gave brute force, sub-optimized and finally optimized solution. Then I wrote the code and tested it. I guess it was b/w medium and hard and can be solved using hash sets. In last 10 minutes, He asked me a very hard computational geometry question and asked me just to tell solution. I gave him a vague idea that we can solve it in O(N) but still some dots were missing in my solution. He said solve it at your home.

 

Round 3:

 

  • 2 tree questions. I was able to give optimized solution for both of them and wrote code for them. One involved simple Tree Traversal and other involved Dijkstra.

 

Round 4:

 

  • Trie question. I was able to give optimized and sub-optimized solution and discussed trade-off of both solutions based on input structure. He asked me to code sub-optimal solution which I did.

 

Round 5:

 

  • Also a Trie questions and input size was 80GB. I gave him a memory inefficient and time efficient solution. He said improve memory inefficiency without changing time complexity which I did and finally I coded the solution.

 

No question was from LeetCode. They were not only concerned about Big O complexity but also code level improvements which don't change Big O complexities at all. Overall questions were not that hard at all. Except third interview, I solved all questions without any hint. In third interview, I gave a solution and I thought it was incorrect but after some time interviewer told me your first solution was correct why you thought it's incorrect. I solved nearly 400 LC questions and out of them 140 were LC hards. I solved the questions topic wise i.e. first mastered DP then Trees, Graphs and so on.

 

After onsite, I cleared Hiring Committee after 1.5 weeks. In the next week, I was matched with a team and finally got offer in third week.

by Expert (107,550 points) 1 flag
0 like 0 dislike

 

January 30, 2021

 

Google Reject Phone Interview

Recruiter contacted after application. Scheduled Phone Interview

 

During interview, the interviewer jumped straight to the question.

 

The question was not a direct one but after going through it I figured it out to be Confusing Number 2

 

First gave brute force solution for going through every number, checking if flipping it does it become a different number. If yes then add it to collection.

 

I myself suggested to the interviewer that this solution is not scalable. In the question I was given N from 1 to 650.

 

I suggested that only digits 0, 1, 6, 8, 9 can produce numbers that can generate confusing numbers.

 

Explained the complexity of this approach as I would have to go through much fewer numbers. (For example for 3 digit numbers it would be 4 * 5 * 5 i.e 100 numbers)

 

Wrote the code for it by generating all possiible combinations from these 5 numbers and checking for each whether it can be flipped or not.

 

Interviewer wanted to try a test case but I told him let me finish up the remaining code (the boilerplate stuff) While I was finishing up the code the interviewer was talking to himself "that ok you got this method and you got this method"

 

When finished up the code I asked the interviewer what test case he wanted to try and he told me that it works. He didn't give me a chance to run my code through some test cases as he jumped to a question.

 

He asked me how would you test your code ? I knew I hadn't handled the case for INT_MAX and told him straight up that it would crash for that input and he agreed.

 

I was a bit confused at this question as the input range was from 1 to 650 and it didn't click to me that basically hes asking that the my code should check whether number is positive or not.

 

My code had two parts as I said above "Generating Combinations" and "Flipping the number to check validity"

 

I told him that you could give a set of inputs of numbers containing 0, 1, 6, 8 ,9 only and another set containing 2,3,4,5,7,9 and a mix of numbers containing both. But he told me we can't do that as the combinations generating method just takes N.

 

Then he told me that N should be positive after some time. After that he told me that the other flip method can be checked using "WHITEBOX TESTING". I told him I didn't know what that is and he explained what it means. I told him that to test that method we could use the above approach as I suggested and he seemed to have agreed.

 

After that the interview ended.

 

Recruiter called couple of days later and said it was not recommended to move forward and couldn't give any feedback.

 

LC : 700+ (128 Hard, 360 Medium, 280 Easy, 2+ yrs of experience) Preparation of more than a year. Did many questions multiple times.

 

 

by Expert (107,550 points) 1 flag
0 like 0 dislike

Background: I’ll be graduating in June 2021 with majors in CS from India.

Google:

 

  • Recruiter reached out to me on LinkedIn in January 2021 and asked me to book a slot in the calendar. The recruiter told me a little about the role and asked me some simple questions on time and space complexity, favourite coding language basics, and a puzzle. The recruiter also asked me to rate myself on a scale of 1-10 on my knowledge of few technologies. Based on my answers, I was moved to the telephonic screening round.
  • Telephone Screen: The interviewer started with a LC medium question which I coded pretty fast and then she asked me a follow up on the same which increased the complexity of the problem but I was able to code that as well.
  • Onsite Round 1: The interviewer gave me a hard question. I started this round by making the mistake of not clarifying my doubt so I spent a lot of time worrying on cases which were definitely out of the scope of the interview. The interviewer realized that and asked me to not worry about those and code my approach. I was able to come up with the most optimal after that.
  • Onsite Round 2: There were 2 interviewers in this round and started by giving me a question of medium difficulty, I was able to come up with the solution and then they modified the question which made the question of hard difficulty. I was able to code that as well.
  • Onsite Round 3: This interview was my worst interview at Google. Just before this interview, I got the email that I was rejected at Amazon so I was extremely disappointed and became extremely nervous. The interviewer gave me a question to which I explained him my approach. He wanted me to decrease the time complexity of the operation. It took me a little time for me to figure out the approach and code it. The code I wrote was a little lengthy and overcomplicated so he asked me to modify it. I was already stressed so I messed up that part and deleted an important part.
  • Onsite Round 4: After round 3, recruiter reached out to me that I would have to perform really well in the 4th round to have a strong application. The round started with a LC hard question. I had seen a similar problem earlier but still it took me a little time to figure out the approach and code it. The interviewer gave me another problem. We were running out of time so he just asked me to explain the approach and not to code it.
  • Onsite round 5: This was googliness and leadership round. To my surprise, this round was also taken by a SWE. This round went really well.
  • Result: Selected

 

My learnings

 

  • Be confident: I am a little underconfident. The nervousness killed my ability to articulate well during the Amazon interviews. You can also go through mock interviews but I feel a little intimidated by those. I was a lot more confident during my Google interviews as I thought I'll never get selected there but I realized that confidence can make a lot of difference during the interview process.
  • Prepare Well: There are a ton of resources available on the Internet. Find the one that suits you.
  • Be self aware: Know your shortcomings and work on those.
  • Ask clarifying questions: The interviewers often ask questions which are vague and want to think about your thought process. Do ask them clarifying questions so that you both are on the same page.
by Expert (107,550 points) 1 flag
0 like 0 dislike

Google | Phone | SWE-India

 February 8, 2022

I had my telephonic round today.(45 Min)

 

Question's were:

 

  1. Given text and the width of a page, find how many lines the text would take on that page.
    I gave the Solution (Similar to Text Justification on Leetcode)

 

https://leetcode.com/problems/text-justification/description/)

 

  1. Given a text data that you’d like to put into a two-column table on a fixed-width page, find the best column size that minimizes the overall height of the table.

 

--> This was the follow up Question.(I gave the solution Using Binary Search)

by Expert (107,550 points) 1 flag
0 like 0 dislike

Google onsite Interview (Software Engineer)

Total 5 rounds:

 

Round 1:

 

  1. Behavioral round (testing of googlyness)

 

Round 2:

 

  1. Technical (Implement Print function in Python)

 

Round 3:

 

  1. Given decreasing and agian increasing series return index of min element. For example:
    Input: [9, 8, 7, 0, 4, 5, 6]
    Output: 3

 

Round 4:

 

  1. Create an API interface for testing team which returns the API test cases based on the % assigned to it
    [type A, 0.5,
    type B, 0.2,
    type c , 0.2
    type D, 0.1]

 

Round 5:

 

  1. Return random node of given binary tree. Similar question: https://leetcode.com/problems/linked-list-random-node
by Expert (107,550 points)
0 like 0 dislike

Google | SDE | Bangalore | May 2019

Location: Bangalore
Interview Date: April 2019 - May 2019
I got call through employee referral

 

Telephonic Round:

 

  1. Time/Space complexity of some sort algorithms(merge sort, quick sort)
  2. Calculate 2^24 (Asked to check how interactive you are with the interviwer)

 

Round-1(Skype):
You have N dices having K faces each numbered 1 to K. What's probability of generating sum S by rolling all N dices.

 

Solved with DP and was called for On-Site interviews at Bangalore

 

Round-2(On-Site)

 

Given a array of pairs(start IP and end IP ) of IP address, and one more IP address as a input. Return the index of a pair in which the given IP address lie.
Solved using binary search

 

Round-3(On-Site)

 

Given a complete binary tree. Find the total number of nodes in tree.
Tree was structured in such a way that: If it has N nodes, it will give numbers in 1,2,3,..., N after level order traversal.

 

Solved using DFS and Binary Search

 

Round-4 (On-Site)
It was a googliness and culture fitment round
I was asked various situation based questions. It was just to check your thought process and confidence

 

Lunch
I was asked to have lunch with a Google employee. I also had some interesting discussion with him :-)

 

Round-5 (On-Site)
A question related to string was asked. Don't remeber exactly.
Gave brute-force approach.

 

Round-6 (On-Site)

 

  1.  

    A matrix of size mxn was given which consists of 0 or 1 only. Find largest possible square having all 1's.
    Solved using DP

     

  2.  

    Give array of numbers. If same element exist in a sub-array of lenght 3 or more, remove all of the element in that sub-array. Return the resultant array after performing above operations.
    Solved using stack. Store element with the contiguous count of that element

Verdict: REJECTED

by Expert (107,550 points) 1 flag
0 like 0 dislike

 

Google India L4 Bangalore reject

Hi everyone, I went through the google intervew process and here are the details:

 

Phone Screen:
Was asked a simple question on graph, quickly solved it.
Feedback was great.

 

After a 1.5 months the onsite interviews:

 

Virtual onsite interview 1:
Question about backtracking. I was trying other graph approaches to see if we can optimize it but finally settled down on backtracking and solved it. Also this problem can be translated to NP hard problem so backtracking is the only way to do it. Coded the solution. Initally gave wrong time complexity of the backtracking as 2^N, but it was n!, which I corrected it. This question was not on leetcode. Aftter I solved it we had chat about on what product does the interviewer work on.

 

Overall experience from my perspective - good but not very great( this question was new to me and not on leetcode so for me to come up with solution in 10 mins was a little difficult)

 

Virtual onsite Interview 2:
A very standard algorithm question directly from leetcode with google tagged, the first question was medium and the second question was hard which was a followup if I was able to do the first one then I can try the followup. Interviewer came and asked me to start coding it, they did not ask for explanation as it is a very standard algorithm which uses stacks to be solved.
I gave the solution using the stacks but my algorithm was partially correct and did not cover all test cases and when I ran it on leetcode afterwards after the interview, it only passed 50% of the test cases. no time for followup.

 

Overall experience my perspective - not great interview as this was a standard algorithm, if you remember the algorithm it is very easy to do.

 

Virtual Onsite Interview 3:
A string question. This question was easy to come up with brute force solution however he asked to optimize the solution further. I took some fair amount of time to come up with the optimized solution. last 10 mins were remaining, he asked me to code it, I coded it but the time was already pass 3 mins. The interviewer kept giving me hints which I was not able to understand however the solution I gave was something similar. Interviewer said at the last that he gets what I am doing. This question was not on leetcode.

 

Overall experience from my perspective - not great as I took a lot of time even though I did it at last.

 

My recruiter did not reach out to me by themselves, after I emailed them couple of times, they just said that I need to improve my data structures, no round specific feedback. No further interviews scheduled after that.

by Expert (107,550 points) 1 flag
0 like 0 dislike

Google
Location: Bay Area, CA
Interview date: Dec 2020 - Jan 2021

 

Phone interview 1 (Coding) :
Q1 - HashMap counting problem that involves string.
Q2 - BFS/DFS graph. Interviewer threw in an unexpected requirement. I didn't finish coding.
Recruiter called 1 week later and asked for another phone interview.

 

Phone interview 2 (Coding) :
Q1 - HashMap involving common characters between 2 string.
Q2 - Guess some string combination. I suggested a brute force solution then time was up.
This round could have been better.
Few days later, recruiter said my results was good enough to move onsite.

 

Onsite 1 (Coding):
Q1 - Graph traversal
Q2 - Graph traversal with memorization
This round went well.

 

Onsite 2 (System Design):
Design some google product. The interviewer was on this team, so he was an expert of the question.
Interviewer tried to break my design by firing many questions at me. I easily defended my design.
This round went well.

 

Onsite 3 (Coding):
Q1 - Grid traversal using BFS.
Q2 - An edge case was added. I couldn't finish coding on time
I could have done better this round.

 

Onsite 4 (Coding):
Q1 - Sorting object question. Interviewer added many weird requirements, by weird I mean I didn't know how to code them. After 35 minutes of trying to understand the question, I finally started coding. During the next 10 minutes I wrote a couple line of code before I was stuck again.
This was my worst round.

 

Onsite 5 (Behavior):
Standard Behavior questions
After 20 minutes, interviewer and I talked about our hobbies.

 

What I learned from Google experience
Google will push you to your limits, whether coding or design. None of their questions are from leetcode.

 

Post interview
2 days after onsite - Recruiter emailed me saying "feedback is positive" and my package is going to Hiring Committee
6 days after onsite - Recruiter called me about Hiring Committee approval of L4. Team matching will be next.

 

Preparation Strategy
Coding
1 year prep plan using Leetcode premium.
For 8 month I spent 1 hour a day working thru Leetcode all time frequency list. I would picked a random problem from the list. Some problems would carry over to multiple days since I did not look at solution. After getting 100% TC pass, I would compare my answer with discussing section.

 

3 month before applying, I did around 25 mock interviews with friends who were also software engineers.
1 week before each onsite, I sorted by company tag.
I never participated in a weekly contest, but seems since many have participated.

 

LC stats during 1 year preparation
327 total
Easy - 33%
Medium - 59%
Hard - 8%

 

System Design
3 month prep
I review my company architecture, whether it was drawings, diagram, or documentation. This helped me at work and system design interviews.
I also browsed thru internet for videos and articles about real world system design.

 

Conclusion
Good luck everyone and keep practicing.

by Expert (107,550 points) 1 flag
0 like 0 dislike

Google | L4 | Sunnyvale | July 2019 [Fail]

Phone screen:

 

  •  

    Given following pattern write a function print(int n):
    n=1 : 1
    n=2 : 2 1 2
    n=3 : 3 2 3 1 2 3
    n=4 : 4 3 4 2 3 4 1 2 3 4

     

  •  

    Given input stream 1,2,3,4,5,6...... we are generating a binary tree from left to right.

     

Creation of the tree : 
 1,    1 ,  1 ,      1  , 
      /    / \      / \
     2    2   3    2   3
                  /
                 4

 

Onsite:

 

Round 1: (45 min)

 

 

Round 2: (45 min)

 

  •  

    Find the best path to collect maxixmum gold.
    Given Matrix there is gold mentioned +ve int.
    There are 0's that are blocked paths. You will start from 0,0.
    Give me the path and number of maximum gold collected.
    Path could end anywhere not necessariliy (n-1,n-1).

     

    Similar to https://leetcode.com/problems/minimum-path-sum which could end anywhere with 0s that you cant visit.

     

 

Round 3: (45 min)

 

  • I dont rember this one but it was coding interview.

 

Round 4: (45 min)

 

  • All behavioural round. These were easy questions and nothing like grilling of amazon LP question.
    Personally I feel amazon LP question are BS and feels like interogation see the Amazon post here.
    • Tell me about your self.
    • How do you work with PM, QA & support? (this is my resume related)
    • Talk about your favourate project.
    • Why are you leaving your company?
    • What are you looking forward to if you are working for google.
    • A lot of talk about what I do and my past experiences.

 

Round 5: (45 min)

 

  •  

    System Design - ticketmaster like fandango but for concert tickets.
    System shows 10 avialable tickets to the user1 for 2 mins.
    Those 10 tickets are not available to other users for those 2 mins. after 2 mins those 10 tickets becomes available to show again.

     

    He was very intereseted in how I design the tables and API.
    The problem he was interseted in to solve was:
    how do you track what available seats you are showing to different users and once the timer is expired how you make those avialable.

     

    The mistake I made I went with distributed cache.
    This opened whole lot of can of worms.
    Cache invalidation is a nightmare in a distrubuted cache. (try to avoid as much as you can and try to use local cache.)

     

    Useful links for System Design:

     

by Expert (107,550 points) 1 flag
0 like 0 dislike

Google | L3/L4 | June | Frontend

I just finished the interview process with Google and wanted to share my experience. I found these type of posts very helpful during my preparation, so I hope this can help some other buddies preparing for interview, won’t be sharing the exact questions or other identifying details, but I hope the information is still useful.

 

4 YOE in one of India's biggest startup
Recruiter reached me out in LinkedIn.
Onsite (5 rounds) +1 Telephonic + 2 Team Matching Rounds

 

All technical interviews followed the same format, with an easy question that would be modified into a medium-hard question once the initial question was solved. For each interview I will generally describe the type of problem

 

Interview 1

 

Question: More related to sequencing of tasks
Response: This interview went almost perfect, I had to write code in Javascript as that was my preferred language ,
Question was more of a topological sorting , but once i solved it , it was more related to promises and different methods of promises such as promise .every etc to sequence the tasks in orders he wanted
I would say this interview went really well for me , i finished early

 

Interview 2

 

Question: FE domain specific + Ds/Algo
Response: This was a very hard interview , as Fe domain level went really deep , P.S the interviewer was an author of famous articles that i read before , so we had some really good interaction , FE domain question was more of implementing retry function and then from there we jumped to implementing promises methods (.then , .catch .finally) , talking about CRP's and ways to optimise it .

 

Interview 3

 

Question: Hasmap+hashset
Response: This was a very easy round for me , i completed coding + running different test cases in arounf 30 mins and i did not have much to ask so we finished in around 35 mins
Second question was 2-d array manipulation , finding paths related question.

 

Interview 4

 

Question: Googlyness
Response:This round revolved around situtations and how would I tackel it .
The interviewer wished me luck and i would say this round went well too.

 

Interview 5

 

Question: String manipulation +implement Somewhat Auto complete
This round was a bit difficult but at the end the interviewer was happy with me and we closed this round on a positive note by cracking some jokes .

 

My Thoughts

 

After the interview, I tried to be patient and wait for the feedbacks , from my side what i can say is since i was more of a frontend engineer , I can say to concentrate more on FE side and questions would be a bit simpler when it comes to DS/Algo because they would grill you more on Frontend . , although there is just one domain specific round

 

After interview i got to know from HR ,
They would be using Angular and Dart instead of JS and React js, So i am a bit skeptical to accept the offer .

 

Also i might get L3 and not L4 , again not sure here ,
My base pay from Google would be less than what i currently get if they gove L3 (P.S its been just a month since i joined a new firm (i had to join since google interview take a lot of time ))

 

I did about 450 LeetCode problems before the onsite. I would advise applicants to focus on the quality of preparation rather than just churning through hundreds of questions. Make sure you understand the fundamentals of DP, search algorithms, etc. I tried to replicate the interview environment while practicing.

 

  1. Result

 

Profile is in the HC stage, Team matching is done . Hopefully , things go well

by Expert (107,550 points) 1 flag
0 like 0 dislike

Google | L3 | Oct 2019 [Offer]

November 5, 2019

Round 1: Behavorial Round

 

  1. How would you handle organizing a team building event for your team?
  2. If you planned to ship a product and you did a big demo right before this shipment, but you find a crash hours before, how would you go about it?
  3. Talk about one of the hardest challenges you've had in your life? Could be software related or not.

 

Round 2: System Design but more domain focused

 

  • I was given a chat application project, and was told to critic the design. I found several architectural design flaws, as well as applying MVVM solution to improve it. However, I was told to not use popular 3rd popular libraries such as RxJava or Retrofit. At this point, I suggested the solution Google themselves use in a library to solve some of the Android issues he was telling me to solve. I told him how I would implement it with the combination of MVVM. Even though I suggested the Google's way of resolution, he was pressing for an even better solution, and I couldn't exactly think of one, so we moved on to more design related issues and I was able to provide more brief general feedback & solutions.

 

Lunch

 

  • For some reason, I was extremely exhausted during this period. I downed a cold brew hoping it would save me for the next 3 technical rounds. Here is what happened next.

 

Round 3:

 

  •  

    https://leetcode.com/problems/string-transforms-into-another-string/ (premium)

     

    He gave some less obvious examples to me at first, and with my fatigue I was stuck right off the bat and was approaching this like a word ladder problem which he quickly dismissed and said we don't necessarily need a tree at this point. He encouraged me to think of strings that wouldn't be possible to transform, which quickly triggered my thinking and made me realize a solution for this. Basically, order and character uniqueness matters. Ordinarily, I should've solved this pretty fast and got to the follow up, but due to whatever lack of momentum I had trouble developing I only got through this part, and not the follow up. By far my worst one, and I knew it. I'm happy to even getting the code up for the first part.

     

 

Round 4:

 

  •  

    Given an N-ary tree, design an API such that the following operations are supported.

     

    1. Add(Node a, Node b) add b to a
    2. Delete(node) only leaves can be deleted
    3. getLeft(Node) get left neighbor of node
    4. getRight(node) get right neighbor of a node.
    

     

    Many approaches to this, the approach I had for this was use a Node class to represent a node in the tree. One optimization to make the operations easier is to give this Node class a parent property. I solved getLeft/getRight with level order approach, there is a better solution to this, but that is as far as I got. Other edge cases include making sure child is not already a child of the parent for the add operation. Similarly making sure it makes sense to delete a child from a parent if it is the right owner. In general, interviewer seemed very collaborative with me on this one, and even delayed the next interviewer to see if I solve some edge cases. Not sure if that was a good or bad thing in terms of scoring, but yeah.

     

 

Round 5:

 

  • Given a person and a vehicle on a 2D grid, find the quickest way a person can get to the vehicle. No obstacles.
    Standard BFS approach
  • Given multiple people on the grid and multiple vehicles, find the quickest way each person can get to each vehicle, and return a list of coordinates representing which person got which vehicle. Similar problem: https://leetcode.com/problems/campus-bikes/
    Also BFS, but the queue data structure would queue every person first as well as some additional data to keep track of which person it is. Then we perform the BFS, and every iteration of the search, each person gets closer to their closest vehicles. Once a vehicle is reached we mark it as used to avoid 2 persons using 1 vehicle. Opted to use a map for the visited structure as opposted to a Set used for part 1, so no one person revisits the same cell twice. We can ID each person before the BFS first so the visited structure knows which cells to update for which person. Definitely some optimizations to the approach, but each of these interviews was 30 minutes, so I aimed to provide optimal approaches with verbose coding, and could fix if time let me. Interviewer was odd for this one, he spent a lot of time observing my approach for the first part which I did fast since it was standard BFS. Afterwards, I only had about 10-15 minutes to solve the next, harder one.

 

Other
I was aiming for L4, but got approved for L3 instead. I was told by some sources it may be due to a lack of FAANG companies on my resume, although others did mention througout the process it was weaker scores 2 out of the 5. Although in my head I thought I did poor for 1 out of 5, since I really wasn't at my best for Round 3 specifically. But you can never judge yourself, because they are trained to make you feel good about the overall experience.

 

Tips and advice

 

Here was my routine, and I plan to do next time I put myself through this.

 

  1. Pomodoro technique - Solve easy/medium/hard problems in 25-35 minutes of deep focus, 5-10 minute breaks. Breaks are critical, otherwise torturing your head will burn you out in days. Whereas, give yourself breaks, will have you sustaining this routine for weeks, with less chances of burning out. Solved 185 LC problems, breakdown is 75 easy - 96 medium - 14 hard.
  2. Leetcode premium explore tab. Recursion, trees, arrays and strings, and doing the company cards like FB, Amazon, Google, etc.
  3. The Discussion tab for leetcode solutions that I did not understand the optimal approach for. I was once at a level where I could not reach optimal solutions on the first try, not even close. With time and practice and deep dives into the discussion tab, I've learned and became more eager to apply optimal approaches and technique for problems.
  4. Solutions tab, although I didn't use this as frequently as I did the discussions, it was helpful at times. But discussion section was definitely better.
  5. Cracking the coding interview solution sections, didn't use as much but was helpful.
  6. Hidden programming book gem I found that I see no one talks about as much as cracking the coding interview is Elements of Programming Interview. The book takes a problem-first approach which naturally takes a tehcnique-first approach as well, rather than more theory based.
  7. Train your mind to stay solution-focused, not problem-focus - tech companies want solution-focused candidates. Regardless of the difficulty of the problem, keep attacking it with your knowledge and push your limits until you solve it or at least can develop a reasonable direction. This means do not evade challenges and remain solution focused, even when you fail (even when you fail interviews). This is hard as most people will handle failure with negative thoughts, but these tech comapnies don't want most people.
  8. Communication. Talk out loud to yourself as you solve the problem, even if your talking to yourself and sound crazy. Talk through all the bad, ridiculous, good, very good, optimal paths to yourself. The more level of detail you can explain to yourself out loud, the better. But it has to be out oud, and not detailed conversations hidden in your head.
  9. For the interviews try to use laptop for coding if possible, and whiteboard to communicate design and psuedocode. This should save a lot of time for critically thinking through the meat(s) of the problem.

 

Last but not least - and this part is kind of personal so feel free to skip this. You may have seen this said elsewhere, but do not make comparisons to others. But I would like to add more. Everyone has their own journey, I'm talking about day 1 on earth to this point in your life. I know an L3 Google offer isn't a big deal to some very smart people here. But to me, even this was never suppose to be on the roadmap for someone like me. At the age of 14/15, I was practically an aspiring gangster in the streets of LA, and figured I'd be in the NBA (no I'm not black/mexican, neither am I over 6 ft, just another brownie with ambition in the opposite direction). Things shifted in my life, I got into coding through the help of my parents and ultimately developed a knack for it. I was good at my not so popular university, and even at that point just due to the reputation of the school this still wasn't expected. But I was determined, and saw what it took, and as discouraged as I was in the beginning (struggling w/ easy problems on LC), dedication and perserverance brought me to the level I'm at today. And I hope to keep growing and learning!

by Expert (107,550 points)
0 like 0 dislike

Google | L4 | India | 2021 [Reject]

February 6, 2022

Hi, Thanks a lot community for immense help. I would like to share my year long journey with Google.

 

Background

  • YOE: 9
  • Current position: Associate at Fintech

 

In Dec, 2020, Google recruiter reached out to me over email but I was not ready so asked for couple of months, then they again reached out in Feb, 2021 and I started the process.

 

Recruiter call

 

Mid Feb - spoke to recruiter, recruiter explained the position and asked me how comfortable I am with data structures and algorithms. Recruiter also asked some simple DS/algo questions like complexity of an algo or which graph shortest algo you will use in some scenario. Then asked for timeline when we can have first round.

 

Screening round

 

In March, I had this round. Interview started with brief introduction and started with basic array problem then had lot of followups which eventually made the problem hard. This was very collaborative round, interviewer was helping me to solve the last followup he had but I was not able to solve with optimal approach.

 

After a week, recruiter called and informed feedback is positive will be moving to virtual onsite loop and connected me with another recruiter. Connected with this recruiter and he explained how onsite rounds will go - first will have 3 coding round split across 2 days. I scheduled these rounds in April.

 

Virtual onsite round 1 - coding [Day 1]

 

Gave a real world problem, this was graph DAG problem. I gave the approach and he was convinced and asked me code it. Gave code and did dry run on some inputs, then he gave me a input on which my code was giving duplicates, but he said I don't see any problem on this input also to which I explained again and he agreed yes, there is problem and asked me to fix. To fix it, I took sometime which was bad - he mentioned this in his feedback.

 

Virtual onsite round 2 - coding [Day 2]

 

Gave matrix problem with some random number generation. First, explained my understanding of the problem then approach, he was convinced and asked me to code, then he gave some followups. All followups were very intuitive, was able to handle all. This round went great.

 

Virtual onsite round 3 - coding [Day 2]

 

Gave hard DP/backtracking problem, I started asking some clarifying questions then explained approach (DFS + backtracking) he seemed to be convinced and asked me write code. I wrote the code and doing dry run but felt that it is not working and kept fixing the code, in the end when time was up, he mentioned that my approach is correct but backtracking part is missing.

 

In 2 days, recruiter called me and said let's have behavioural round - I scheduled in coming week.

 

Virtual onsite round 4 - behavioural

 

Started with introductions then standard question - challenging job, failures, conflicts, ... Hard to judge, but this also went well.

 

In couple of days, recruiter emailed me asking all details - salary slips, Google acquaintance (someone at google I have worked with, who can provide my feedback) and other details. He called also, explaining he will preparing my packet for hiring committee, but will take sometime - around 2 weeks.

 

After 2 weeks (May mid), I reached out to recruiter and surprisingly he informed me that, I will have to go through one more coding round, then we will send the packet to hiring committee. I scheduled this round in 2 weeks - June first week. I took unnecessary pressure for this round thinking this is a do or die round and impacted my performance in the interview also.

 

Virtual onsite round 5 - coding

 

Gave some real world problem - related to array of tuples, I thought for a while and explained the approach he was convinced and asked to write code. I wrote and while doing dry run he pointed out one problem, which was due to the fact I assumed some initial value which was not the case so I corrected the code and now was good. Then he talked about complexity and then gave some followups, implementing which actually increased time complexity which he asked to fixed, which I took care with adding a simple condition. He was satisfied with the fix.

 

In around 2 weeks (July start), recruiter called me and said we are sending your packet to hiring committee, please ask your google acquaintance to fill a form received from me. I informed my acquaintance, he did received an email.

 

After 2 weeks (mid July), recruiter called me and informed one of the hiring manager liked your profile and wants to talk to you, asked me if I am interested - I said yes. He said will talk to manager and schedule fit call with him but didn't heard back from him, I reached out asking about fit call - he said working on it.

 

By end of July, I received an offer from some other company where I can join if not selected at Google, I called recruiter and informed I have got an offer and has one month of notice so would be great if I can get the result in a month’s time. He said one month is good enough time will surely get the result by then.

 

I was waiting but for a month I didn't received any update from recruiter - I joined other company in Sept first week(I could have delayed the joining but sure by how much). Next week I got an email from recruiter that one hiring manager wants to speak to me and asked for my availability, I scheduled this next week(mid Sept).

 

Hiring manager - Fit call

 

Discussion was majorly around my past experience, what I am looking for in next role and what his team works upon. One thing that didn't went in my favour was he wanted someone with Java experience - He asked In what all java frameworks you have worked. I said None, I have worked in C, Python and Golang but would be great to learn Java. I was kind of knew he won't select me based on the interview.

 

After 2 weeks, I asked status about my candidature - He replied in couple of days saying it's no hire from hiring committee at this point in time?. I was very sad to hear this - asked for some feedback, he said will connect but didn't got any call/email. After a months of effort, I finally connected with him to get feedback.
Didn't heard anything major in terms of subjective feedback, rating given by 5 onsite interviewers were - 1 strong positive, 3 positive and 1 negative. He encouraged to appear again after 6 months.

 

My leetcode stats: 458 (150 - easy, 265 - medium, 43 - hard)

 

My takeaways

  • Do not shy to ask more time from recruiter to prepare to you are not ready, they know and will happily to give a month or 2 time
  • Overall, apart from delay I liked the process - the way its managed, recruiter is always reachable, they will provide some study material also
  • For behavioural rounds - I recommend spend some time and prepare well because they asks some questions which require thinking from our current role so make note of major milestones, failures, conflicts
  • Expect hard problems in a round or two, so practice hard ones also
by Expert (107,550 points)
0 like 0 dislike

Google Interview Experience L3/L4

February 6, 2022

Edit [for 3.5 years experienced - L3/L4 level]
Few tips and suggestions sharing in the end.

 

Phone Interview:

 

There is a grasshopper that starts from the root node, if the hopper hops to a node with no children the hopper is stuck and can't move further. If the grasshopper has the option to move then it has to make the hop. Basically the goal is to find the probability of the grasshopper landing at each node.
image

 

For given graph, return probability map for each of node at time = INFINITY;

 

Q2: Same question in a directed acyclic graph?
image

 

Google Onsite Rounds:
Round 1
Q1: Given a list of tasks (a task have id, arrivalTime and executionTime)
At any point of time from a pool of pending tasks task with minimum execution time will be picked up first by the core.
and a single core processor to execute those tasks. You need to find the order of execution of jobs.
(https://leetcode.com/problems/single-threaded-cpu/)
Followup : Modify the code to get the order of processing using 2 cores processor.

 

Round 2
Q1 Given an array of building heights.
You are starting at first building. You have b (no of bricks) and r(no. of ropes). You can only move by 1 building at a time. To move to the next building,
If next building height is less or equal you can move without using any resource(bricks/ropes).
If next building height is greater you can either use bricks (1 brick for 1 unit of height) or a rope(you can climb any height using rope).
(https://leetcode.com/discuss/interview-question/528584/Google-or-Onsite-or-How-Far-Can-We-Reach-using-Rope-and-Bricks/465758)
(https://leetcode.com/problems/furthest-building-you-can-reach/)
find the maximum distance you can cover using given array, b and r.

 

Round 3
Q1: Given an array of N distinct unsorted integers. Return a list of numbers which can be found in the array using binary search.
Ex: If the array is [4, 3, 5, 8, 9, 6, 7] answer: 3, 5, 8, 10
(https://leetcode.com/discuss/interview-question/352743/Google-or-Onsite-or-Guaranteed-Binary-Search-Numbers)
Followup
how to prevent dynamic growing of arrayList which is storing result?

 

Round 4
There is a country that has multiple cities, and for simplicity each city has a 3-letter name. Some pairs of cities are connected with roads. Example:
Your friend recently took a trip around some of that country's cities. You ask them what their itinerary was, and they say: "I went to AAA, BBB, CCC, DDD in that order."

 

You quickly realize your friend must have misremembered, as this itinerary is impossible. BBB is not connected to CCC, and DDD doesn't exist. But, with a two-letter change, you can make a valid itinerary: AAA, XBB, CCC, DDY so you guess that was your friend's actual itinerary. You could also consider AAA, BBB, GOO, DDY, but that requires 4 letters to change so it's not as good of a guess.

 

Minimise the cost to validate the itenerary.
(https://leetcode.jp/problemdetail.php?id=1548#:~:text=You need to return the,[i %2B 1] ).)

 

Round 5 (Googlyness)
Tell something about a project that you are satisfied with/and proud of.
Tell about an instance where you faced interpersonal problems with people around you.
Tell about an experience when you have worked with a non performer in your team and how you helped them.
Tell about the problem where you faced challenges in working with them as peer.

 

Result:
My rounds went well as per me despite during prep I only did around 90-100 Leetcode questions (60+-med, 20-30-easy, rest hard) so was feeling underprep.
I was able to propose solutions in each of round. And able to optimise the solutions and code them as well.
Though during feedback communication via HR, in R4 and R3 there were gaps, and these were the rounds I was thinking were gone relatively better were the ones where interviewer pin pointed my mistakes harder and the ones which I was thinking that I screwed up like R2, feedbacks were actually good.

 

Common feedback was around good DS and algo and communication skills, but slow coding and took some hints in resolving few of the edge cases.

 

HR sent my profile for L3 to HC also parallely started team matching for expediting the process. I got a team match- HM was very cool and confident to meet. I started building hopes. But unfortunately HC result doesn't turned out to be positive.

 

Tips/lesson learned:

 

  •  

    Believe me, almost everytime you will feel that you are underprepared, no matter how much practice you do. I watched youtube 15-20 mins before interview to distract my self and be less nervous for interview. That helped me to not overthink and not let nervousness impact my thinking ability.

     

  •  

    Interviewers were very very nice, In R2 I came across such an amazing person who was not letting me down. I optimised my solutions as much as I can and every time she was asking for more optimised.. whenever she felt I was blank she proposed a hint. Inbetween I did quit on myself, but she didn't and she constantly trying to understand my point of view. And despite of all this hassle her feedback was best out of all. She was one of the best interviewers I came across in my carrer, not because of her good feedback but because of her primary focus point to evaluate was based on what and how I am thinking.

     

  •  

    They were expecting to write code in 5 mins once algortithm is identified. So practice accordingly.

     

  •  

    If you are taking hints/help that is considered as -ve, in my experience.

     

  •  

    They only ask you to write code for best possible solution, till that time they keep on grilling you to optimise the approach. In R2 I proposed 4 algorithms and then jumped to coding.

     

  •  

    Also I was doing constant commuication with interviewers that was the positive part.

     

  •  

    For those who are in the process or about to be a part of it, I would suggest to do quality practice as I only did few leetcode questions but the quality is something I focused on, practice till you are able to recognize the pattern of question and relate it to few agorithms that you are aware of. Every question is just a tweak in some standard problems. Make sure to cover maximum categories of patterns.

     

  •  

    Also its okay to search stupid stuff related to process on Quora/Over internet, to be nerovous, to be curious, to roam around the room everyday and refreshing your gmail for an update from HR. Everybody who goes through process feels same. So you are not alone.. only suggestion is dont overthink and talk to freinds who calm you down!

     

 

Resources:

 

  • I practiced around 20-30 days if I am not wrong parallel to office, and believe me finding practice time was relatively easier during these virtual times. I have done basic level of DS and Algo in previous switches/college placements so I didn't started from scratch.

 

Overall though outcome was not in my favour, but indeed one of the best interview experiences I ever had. Good quality questions, with sensible interviewers, amazing coordinating HR's and transparent process(Except HC ofcourse).

by Expert (107,550 points)
0 like 0 dislike

Google Phone Interview

April 26, 2021

// Question:

 

// Example input:
// "some text"
// [0, 4) / “some” -> X
// [5, 8) / “tex” -> Y
// [3, 6) / “e t” -> Z
//
// You need to output consecutive (non-overlapping) chunks of text with the same set of annotations:
// Output for the example input:
// [0, 3) / “som” -> X
// [3, 4) / “e”-> X,Z
// [4, 5) / “ “ -> Z
// [5, 6) / “t” -> Z, Y
// [6, 8) / “ex” -> Y

by Expert (107,550 points)
0 like 0 dislike

Google Internship and conversion interview experience

Hi, I would like to share my experience with internship and conversion interviews for Google with my Leetcode community where I learned and grind a lot. This is a long post and I hope it will help my fellow programmers to get motivated and encouraged to work hard.

 

The interviews for google internship comprises two online assessments one is the coding challenge and other is a survey. Coding challenge had two questions one was medium and other hard according to LC standards. The topic they covered were sorting and dynamic programming questions. Survey usually comprises behaviour questions.

 

If you pass this your recruiter contacts you within 2 weeks to schedule two phone interviews of 45 mins where you have to code on google doc. My two phone interviews consisted of four questions based on topics like tree traversal, data structure question exploring the use of hash map, pattern matching question and sorting algorithm. I found all were of medium difficulty. Usually the question starts with a basic question and then follow up questions to increase complexity. This is followed by the host matching stage where your profile is selected by any host then only Google extends you an internship offer. People usually in this stage refer to this stage as limbo as you don’t know what is happening and 10% of the interns in this pool end up not having an internship offer. I waited for over 3 months at this stage. When I lost hope I got a host matching call from google cloud and youtube team and I went with the cloud team to do my internship in Google's Sunnyvale campus in California. So never lose hope, believe in yourself and the work you have done so far to be what you are today.

 

For converting your internship to a full time job you have to work real hard not only on your internship project but also on the conversion interviews. Google uses 5 major data points to decide to extend you full time offer or not. These include feedback from your host manager, feedback from co-host, feedbacks from two onsite interviews and code quality. Your team and Google provide you opportunities of mock interviews from fellow Googler to prepare you for onsite interview this is the one thing which is done by Google to boost your confidence for the upcoming conversion interviews which usually comes up at the end of your internship or you can take it later also after your internship is over. I decided to take it in my 2nd last week of internship. Because last week is pretty hectic with internship wrapping up and final project presentation. My conversion interviews each had one question each, conducted by two bright Googlers and covered topics like dynamic programming and BFS. It was more of a healthy discussion rather than a typical interview where we talked about a general approach, how we will modify it to handle different cases, we did complexity discussions and dry runs on test data over the whiteboard.

 

I did my part and now I was waiting for the decision from the Google's hiring committee. After two weeks I received a call from my conversation recruiter saying since you have work experience for 3 years we can't consider you for a new grad track to hire you and your spot is not fixed in the team where you interned and you have to sit through team placement once my packet is approved by HC. That was really heartbreaking as I was expecting to work in my Google cloud team. But my new recruiter was very encouraging and told me that one of my conversion interview was a little weak and your host was happy to provide strong feedback to the points which were lacking in the interview. Unlike intern host matching, the team placement for full time employees is not very hard and Google tries to find a team for everyone depending upon their strengths and weaknesses. I was fortunate and lucky enough as I was picked up by a hiring manager in a month and Google extended me a full time offer.

 

In the end I would like to mention my hard work and grinding over the leetcode paid off as I was able to get a chance to work in my dream company. I wish all my fellow leetcoders to keep practicing to keep at the top of your game and when the right opportunity comes you knock it off the park.

by Expert (107,550 points)
0 like 0 dislike

Google Telephonic Interview

You are given the below array and each element in array is having some specific property
like below
^ = doubles
V = vanishes
any other character remains the same

consider the below input
I/p : '^' '^' 'T' 'T' _ _
this will be converted to array below
O/p : '^' '^' '^' '^' 'T' 'T'
so in the above example consider T as any other character and '_' empty space
when if after doubling this '^' the characters are going out of array length then we can throw error.
we need to return the o/p in the same array we cannot use extra space.

by Expert (107,550 points)
0 like 0 dislike

February 7, 2021 

Google L4/L5

Had virtual onsite for Goog 3-4 days back, 3 coding rounds. Bit of unlucky day.

 

First interview: Found optimal solution right away. Explained solution for over 10 mins. After coding done, interviewer added a follow up with 10 mins left. Failed to recognise a simple extension to my solution could have handled this. Just 1 minute after the interview correct solution hit my mind :(.

 

Second interview: By far the most unfortunate one. I listened to question, noted it in shared doc, asked clarifying questions. Explained a dp approach and time complexity and told I would be writing recursive solution with memo. Interviewer agreed. Wrote the code, interviewer doubted about time complexity and asked me to revisit the code. I did and found same time complexity. Next 20-25 minutes went on discussing about time complexity with no agreement at the end. Lesson learnt: Always code bottom up dp.

 

Third interview: Found optimal solution for first problem quickly, coded it fast. Got second problem. Failed to recognise it as a graph problem. I felt interviewer kept on giving hints way too fast causing thinking even more difficult.

 

Sometimes I blame the lack of sleep the previous night. The feeling of I could have done much better haunting me :(

by Expert (107,550 points)
0 like 0 dislike

October 27, 2020
Google Phone Interview

Partition cards in sequences
We use cards numbered from 1-9.
valid sequence = three cards with consecutive numbers. E.g.234
invalid sequence = 256

 

The player has 12 cards, and wins if there exists a partition of them that forms 4 sequences.
Write a function that takes in a list of 12 numbers and decides whether or not it forms a winning hand.
//Can use a number only once
Input 1 : [ 1, 4, 3, 2, 5, 7, 8, 6, 9, 3, 2, 4]
//Sequences: 123, 456, 789, 234
o/p: True
input 2 [ 1, 4, 4, 2, 5, 7, 8, 6, 9, 3, 2, 4]
//Sequences: 123, 456, 789, (invalid)244
o/p: False

by Expert (107,550 points)
0 like 0 dislike

Google | L3 | August 2021

October 12, 2021

Previous Experience
Graduated from a very well known CS school in May 2020. Have worked full-time for a year at F500 company. Recruiter reached out to me in late July and moved directly to onsite since I had reached the HC couple years back

 

Interview
Going to be generic since NDA but will provide my overall thoughts on how I did

 

  1. Onsite 1
    * Worked very well with the interviewer and got a working and optimal solution on the question. Very little hints from the interviewer but some guidance. Question was a LC Easy-Medium, felt like it went very well and had great conversation with interviewer.
    * My grade - 4.5/5
  2. Onsite 2
    * A very interesting problem that ended up being graph related. On first look I had no idea how to solve it but ended up breaking it down and eventually coming to a working optimal solution with very little input from interviewer. I felt like this was a very satisfying and harder problem than the previous so felt like if any round had to be a 5/5 it was this.
    * My grade - 5/5
  3. Onsite 3
    * A simple problem that ended up being a little bit difficult. I messed up a few java specific things and eventually arrived at a working solution with some help from the interviewer, but overall felt like my approach was very messy. Not sure how google values getting a working solution vs input from interviewer.
    * My grade - 3.5/5
  4. Onsite 4
    * A medium - hard backtracking question. I needed quite a lot of help from my interviewer, but even so I was able to reach an optimal solution as well as figure out the followup questions. But definetely needed some help from the interviewer. This is another case of me figuring out a solution but not sure how google values input from interviewer.
    * My grade 3/5
  5. Onsite 5 - Behavioral
    * Typical behavioral interview, wasnt too vague of questions or anything. I thought I did okay, repeated a lot of my examples but had a great conversation with my interviewer.
    * My grade 4/5

 

After the interview
No feedback yet, so far been 2 days since my interview. I thought some of my interviews were spectacular while others were extremely underwhelming. But for what its worth, even in the underwhelming ones I was able to reach a working/kinda-optimal solution. Does anyone know how interviewer input will impact results?

 

Closing Thoughts
I personally didnt do that much Leetcode (maybe like 20 or so) leading up to the interview. I was not actively interviewing so this just kind of came up. I reached HC but got rejected two years back as a new grad so hoping I make it past this time! But considering I needed a bit of help from my interviewers on interviews 3 and 4 I dont think my odds are very good

 

UPDATE
Got an email that I am proceeding to HC... still not feeling very confident due to my iffy 2 rounds but fingers crossed!

 

UPDATE 2
Passed HC, went through team match and have accepted L3 offer for MTV at 215k USD TC

by Expert (107,550 points)
0 like 0 dislike

Google | L3 | Bangalore | Apr 2020

Education: Tier - 3 College | IT
Years of Experience: 6.3Year
Prior Experience: Top Investment Firm

 

My Joy of happiness is getting interview call from Google.

 

Telephonic:
Similar to

 

  1. https://leetcode.com/problems/design-search-autocomplete-system/
    Solved using multiple way Substring and Trie.
  2. Binary Search problem.

 

Virtual Onsite: I was prepared for Design and DS algo but my first round was something else:

 

  1.  

    Integration (Problem Statement)
    We are implementing a call center solution for technical support for our product. We have 2 existing systems:
    On-premise accounts receivable as part of an ERP solution, backed by a MySQL database.
    Salesforce CRM system for sales reps, to track accounts, and contacts.
    The call center system is hosted by another SaaS provider. We want customer information such as outstanding invoices (from the ERP) and account and contact information (from Salesforce CRM) to be viewable by customer support representatives when they handle an incoming call.

     

  2.  

    Similar to
    https://leetcode.com/problems/meeting-rooms-ii/
    https://leetcode.com/problems/maximum-subarray/

     

  3.  

    Googliness

     

  4.  

    https://leetcode.com/problems/serialize-and-deserialize-n-ary-tree/
    Vast discussion on Tree and Graph.

     

  5.  

    Similar to https://leetcode.com/problems/design-hit-counter/

     

 

All question were descriptive you need to ask them input output and more detail.

 

My preparation:
I used to solve hackerrank problem, Its been 10 month one of my friend suggested me to try Leetcode and i started loving the platform without even having premium account, On blackfriday i purchased premium account and started preparing company wise.
Total leecode Solved: 250+ i usually repeat problem very often as i have tendency to forget.

 

Result:
Apart from 2nd Onsite (I screwed it because of Over-excitement) i solved all the problem optimally .
Friday 6PM got call from HR and she explained me about my feedback on all round suggested me to improve my skill on designing and discussed about what went wrong 2nd onsite round.
Got mail from HR let's stay in touch and reconnect in 10-12months.

 

My Success
From private engineering college to working in top investment firm to attending google interview.

 

In last 4 month i have attended more than 7 Interview and that one round which doesnt allow me to grab offer letter, want to overcome it.

 

Stay Healthy :)

by Expert (107,550 points)
0 like 0 dislike

Google | L6 | Seattle | 2019 [Offer]

NDA prevents me from posting coding and design questions.

 

YOE: 11

 

Preparation: Approx 150 (110 easy, 30 med, 10 hard) leetcode questions in 3 weeks. 80% coding, 20% system, 0% behavioral studying (over 3 weeks).

 

Phone Screen: Skipped.

 

Onsite (each round was 55 min):

 

  1.  

    Met with recruiter and chatted for 10 minutes.

     

  2.  

    Code: 1 med-permutation, 1 hard-graph (I never encoutered these questions on LC practise). First problem, whiteboarded my thoughts, coded on laptop and took approx 35 min due to many lines of code. Second problem, just gave algorithmic solution on whiteboard.

     

  3.  

    Code: 2 medium-recursion backtracking and string manipulation (I never encoutered these questions on LC practise). First problem, whiteboarded my thoughts, coded on laptop and took approx 30 min. Second problem, just gave algorithmic solution on whiteboard. Then had about 5 minutes remaining to chat.

     

 

Overall, coding was fine as I gave what I thought were optimal solutions and self-tested my code with examples. Interviewers didn't ask any followup, just figure out the time/space complexities.

 

  1.  

    Lunch. Chatted with a manager.

     

  2.  

    Googleyness/Behavioral. Standard leadership and work experience questions. I had a good amount of experience to answer all the questions.

     

  3.  

    Domain Expertise/Design. I was comfortable with this portion as I consider myself very knowledgable. I was able to have a good conversation with Google's expert.

     

  4.  

    General System Design. Based question on interviewer's recent project. So it was not a typical design question you see on the internet. My solution was purely based on-the-fly thinking and using my past experience.

     

 

Hiring commitee approved a few weeks later. My thoughts for L6 level is that design and behavioral have large weights in the decision, but you still need to be a good coder.

 

Overall: Great experience. Recruiter and interviewers were friendly and respectful.

by Expert (107,550 points)
0 like 0 dislike

Google Phone Screen Experience L4

May 19, 2021

Recently had my phone screen with Google for L4.

 

Here are a few of my findings/experiences.

 

  1. Interviewer was very friendly and polite.
  2. He asked about the current role and challenges faced there.
  3. Covered in depth analysis of current projects and asked a few questions about design patterns and architecture.
  4. For Coding, question was similar to binary tree zig-zag level order traversal (LC Medium).

 

Coded up the solution, made a mistake but quickly fixed it and he seemed content with the fix.
Got the positive feedback from the recruiter and onsite rounds are scheduled.
Hoping for the best!!!

by Expert (107,550 points)
0 like 0 dislike

May 19, 2021

Google Phone Screen Experience L4

Recently had my phone screen with Google for L4.

Here are a few of my findings/experiences.

  1. Interviewer was very friendly and polite.
  2. He asked about the current role and challenges faced there.
  3. Covered in depth analysis of current projects and asked a few questions about design patterns and architecture.
  4. For Coding, question was similar to binary tree zig-zag level order traversal (LC Medium).

Coded up the solution, made a mistake but quickly fixed it and he seemed content with the fix.
Got the positive feedback from the recruiter and onsite rounds are scheduled.
Hoping for the best!!!

by Expert (107,550 points)
0 like 0 dislike

 

Google | SWE | Mountain View [Offer]

July 21, 2019

Posting a friends experience, On-site, Mountain-view, SDE, Received job offer
I would appreciate if you could post how you would approach these questions, it would help all of us.
Thank you

 

Round 1:
There are X people at Google looking for a scooter to use. There are Y scooters stationed throughout Google. Design an algorithm to pair people to scooters. https://leetcode.com/problems/campus-bikes

 

Details:

 

  • X <= Y
  • People and scooters placed at various points on a 2D grid
  • Input is list of locations of people and list of locations of scooters
  • Algorithm should greedily prioritize closest pair of person and scooter

 

Round 2:
You have a staircase with N steps. At each step, you may climb one step or two steps. How many ways are there to climb to the top of the staircase? https://leetcode.com/problems/climbing-stairs

 

Follow-up Questions:

 

  • Write algorithm for variable number that can be climbed at each step (what if we could jump two stairs?)
  • Write algorithm that tells us number of ways to arrive on last step for each leg (number of ways that end with left leg vs. right)
  • Now consider a variable number of legs.

 

Round 3:
Check to see if a tree is balanced https://leetcode.com/problems/balanced-binary-tree/

 

Round 4:
Given a string X and a dictionary of words Y, return a set of words in Y that are at most one character different from X.

 

Follow-up questions:

 

  • what is best data structure for our dict for this algorithm?
    ---trie?
    ---hashmap?

 

Round 5:
Consider the rules of blackjack. If the dealer is holding two cards summing to X, what is the probability that they will bust?
Similar question: https://leetcode.com/problems/new-21-game

 

Details:

 

  • Rules of blackjack (for this problem):
  • Dealer busts if holding over 21
  • Dealer doesn’t hit (stays) if 17 <= X <= 21
  • Dealer must draw below 17
  • Ace = 1 (not 1 or 11)
  • Equal probability of drawing 1 to 10 from the stack (independent of what dealer has already drawn, imagine an infinite stack of cards) (probability of drawing 10 = 1/10, not 3/13)
  • Make your algorithm run in linear time

 

Follow-up questions:

 

  • What if instead of busting at 21, the dealer busted at 1,000,000? Or some variable?
  • What if dealer could draw from more than 1 to 10? Design algorithm for variable drawing range.
  • Design algorithm for variable window of when the dealer stays.
  • What is the minimum space complexity of this algorithm (with linear time)?

 

by Expert (107,550 points) 1 flag
0 like 0 dislike

Google | Feb. 2021 | Reject

Google | Feb. 2021 | Reject
Status: 15 YEO
Date: Feb. 2021
REJECTED

 

It was a cold and dreary winter day when I happened to check my email in the midst of a busy working day. I expected to find my ordinary, yet another recruiter contacting me to try out for the startup of the day with promise to become the "next Amazon". To my surprise what I found instead was an email by Vickie (fake name for anonymity) from Google asking me to try out. To be certain, I am not looking to switch jobs, and I have a policy to decline all recruiters for years. But an offer from a Google recruiter is my exception. Vickie was peppy, warm, and encouraging and we scheduled a phone screen.

 

PHONE SCREEN 1 hour
I received a link for Google Meet video chat and a "Google Interview'' virtual coding environment. Google Interview is really similar to how you write code on LeetCode, a plain place to write code with no auto-complete. First you need to select a few checkboxes agreeing to their policies and not to share details- so I will comply and keep exact details vague.

 

I was very nervous going in and had trouble maintaining a cool head. Interviewer was really nice and encouraging. After one minute of introductions we dove into the question. I was asked to design APIs related to Summed Area Tables https://en.wikipedia.org/wiki/Summed-area_table
It was the first I ever heard of summed area tables and I didn't see anything like in LeetCode afterwards. I came up with a O(N) answer. I was told there was a O(1) answer. The interviewer tried hinting to me the answer, but I wasn't able to get it.
I was certain that I didn't pass and spent the next 2 days really bummed. I got a phone call a few days from Vickie saying the interviewer liked the way I think. My heart nearly skipped a beat in disbelief. I said- "Can you please repeat that?!"
I saw on some website that Google grades on a 1-4 scale. 1 = definitely no, 2 = weak no, 3 = weak yes, and 4 = definitely yes. If that's true I believe I received a 3. To my dismay she passed me on to a different recruiter, Jane (another fake name), who wasn't nearly as nice.

 

Due to Covid-19 Jane scheduled 4 hours of interview all to be done via Google Meet and Google Interview. The morning of the interviews I woke up cautiously optimistic. Surprisingly, I slept well the night before and ensured I ate a satisfying breakfast to keep me going.

 

SYSTEM DESIGN 1hr
There was a one minute hello/hello and then we dived into the question. The question was to design a specific feature in Google Maps. However, the interviewer was very specific in the way he wanted the answer. He was much more interested in back-of-envelope calculations and math then he was to the overall design. He said he wanted to know how much CPU cores are needed. He didn't seem interested in API design, front-end interactions, databases or anything like that.
In general, I struggle to do math under pressure and here as well I struggled in the calculations. Overall, it was a positive discussion, although the interviewer was tough throughout the conversation. Not even a semi-smile or word of encouragement. I would probably give myself a 2 "weak no".

 

1st Algorithm Question 45 min
A hard to describe question without outright saying the question related to "rate limiting". It would probably be equivalent to LeetCode medium. I got the answer within the time allowed using LinkedHashMap and the interviewer was satisfied. I would give myself a 3 "weak yes".

 

2nd Algorithm Question 45 min
After a longer break it was back for a second algo question. It was a question related to generating power sets from an array. However I wasn't going to be "just" generating a power set, he added a twist that took it from the equivalent of a LeetCode medium to a LeetCode hard. The question itself is not on LeetCode.
I mostly got working code to generate the power sets, and offered ways to solve his twist. Unfortunately, I couldn't calculate the running time of generating a powerset, which he later told me is O(2^n). If I would have solved the twist it would have offered better running time. I would probably give myself a 2 "weak no".

 

3rd Algorithm Question 45 min.
A question related to concurrency in Java and required in depth knowledge of the Threads API. Once again, the interviewer added an algo twist as well to make it interesting (and challenging). I don't see anything like it on LeetCode. It would probably rate somewhere between LeetCode medium to hard. I solved the question but needed hints on how to properly use threads API as it's not something I've done regularly. Probably give myself a 3 "weak yes''.

 

I ended the day worn out from preparing and worn out from 4 hours of difficult high-pressure interviews. I told myself I am not looking for a job, so even if I get a no, it will be ok. I was rather certain I had mixed results and the answer was probably 50/50. I reveled in putting my algorithm book back on the shelf and avoided visiting LeetCode to enjoy my respite. A few days later Jane called. "We don't often do this", she said, "but you are in-between. You have potential but you need to solve quicker so can also solve the twists." She offered me the option to take two more algo interviews (no system design, yay!) that would determine my fate. However, I'd need to do really well on both of them to tip the scales.
I was already in mental shape practicing problems and I came so far, I was not going to stop now. So I apologized to my wife and accepted another week of emotional roller coasters.

 

4th Algorithm Question 45 min.
Questions relating to Iteration and Binary Trees. First she had me code a basic problem as a warmup. I was able to do it quickly and discuss the nature of Binary Trees and ways to traverse. She then got to the real question which is a LeetCode medium and then added a unique twist that took it from LeetCode medium to LeetCode hard. I was able to think of several different possible solutions and their tradeoffs. She liked the suggestions but kept adding restrictions forcing me to see other angles and alternative solutions. Overall an extremely positive discussion but I ran out of time to code what she wanted within the restrictions. I would give myself a 3 "weak yes".

 

5th Algorithm Question 45 min.
A question related to shortest distance in a matrix, which kind of reminds me of some of the "Island" questions on LeetCode. However, he added a twist that took it from LeetCode medium level to LeetCode hard. I started with solving bruteforce way, rather quickly which had suboptimal run-time. However, no matter how hard I tried I couldn't think of a way to solve for his twist in the time given. In retrospect I should have outright asked for a hint, since the interviewer was not helping me out at all. Hard to rate myself for this one since I got a solution and was able to discuss many alternatives. Probably either a 2 "weak no" or a 3 "weak yes".

 

I was at a loss if to be optimistic or not. I needed an "enthusiastic supporter" to get accepted, but I wasn't sure if my 4th interviewer was enthusiastic or not.
A few days later I got a phone call from Jane. I could tell from the first second it was a reject. She started with "do you have time for a quick call". The entire phone call seemed like a chore she was counting the second for it to be over. She said it was close and clearly I would be a good fit, but ultimately I need to be able to solve the questions fully to be accepted. I was borderline from beginning to end and didn't ace any of them.
Now back to life summarizing this a few weeks later. I learned a lot while studying, and sacrificed a lot to take a chance. I tell myself, if you are not failing on taking risks, you are not pushing your boundaries. Really depressing too, since I don't have anything to show my hard work. Like running for elected position but losing the election. We've been educated in little-league sports to believe that putting in effort is all that's needed. When in reality, it takes aptitude, attitude, and ultimately luck. Maybe next time luck will be on my side.
I also realize that I am up against a lot of recent grads coming out of CS degrees who LeetCode is like homework problems they've been trained to solve. Whereas, my real world experience helps me to write clean and proper code without thinking, but it doesn't prepare me in the slightest for LeetCode style algo questions.

by Expert (107,550 points) 1 flag
0 like 0 dislike

Google Design Question

Design a system where files are being transferred between multiple servers . Imagine the files are really huge .

by Expert (107,550 points)
0 like 0 dislike

September 20, 2021

My Google L4 Experience. No offer.

I had my Google(Canada) virtual onsite interview last week. This is not interview experience post. I will create that separately with more detail. Here I am writing question types for each round and want to know what other people think.

 

Round 1:
Behavioural

 

Round 2:
Math Problem. Medium level. Optimize time complexity to O(log n). Found in Leetcode.

 

Round 3:
Math Problem. Something new. Cannot find in Leetcode. Medium to Hard level.

 

Round 4:
Design n particles movement game problem. Consider collision with boundary and collision between particles and lots of more scenario. Math problem. More like Physics Math. Very very complex. Interviewer had created this game by himself. He was expecting me to write code for it under 45 minutes.

 

Round 5:
Array problem. Again includes Math logic to get result. Nothing to do with any other Data Structure.

 

Not a good interview experience. I am not sure what Google is trying to do here. I spent the last 1.5 months preparing for an interview. I interviewed for L4 and not a single question related to HashMap, Tree, Graph, Trie, Linked List, Stack, Queue, etc.

 

This makes me feel sad because I solved around 450+ leetcode questions and I am preparing for Google for more than 1 year and I was very confident this time. But, I ended up with this type of question and it wasn't a good interview overall. I am not sure how am I judged as a Software Engineer and what Google is expecting from me based on this interview.

 

Update: Arranged 2 more interviews because I had audio issue in 1 of previous interviews.

 

Round 6:
2D matrix DFS - Came up with best solution and coded correctly.

 

Round 7:
Card problem - Complex problem. Math logic to get solution. No hint provided by interviewer. Very rude and silent. Cannot find anything related on LeetCode.

 

Result: No offer - Asked me to apply again after 12 months.

 

Your experience could be very different from mine so don't feel demotivated. Keep grinding.

 

"LIFE IS TOUGH but so are you"

by Expert (107,550 points)
0 like 0 dislike

Google Mountain View SDE1

Status: SDE at Defense Company, BA CS Top 20 CS school
Position: SDE 1 Google
Location: SunnyVale, CA
Date: May 6 2019

 

Technical phone screen (1 hour):
Simple Very Easy LeetCode question that escalated into how MapReduce Works. Wanted me to design map reduce system and long discussion about tradeoffs on map reduce. Moved to onsite after 1 phone screen.

 

Onsite (5 rounds):
Tree Pathing, HashMap of grid, Random number, ArrayList Integer sums + behavioural interview
I suspect that lunch interview is part of it.
They are very good at making you feel like you are doing well. However, the standard is that you need to dominate and smash every single round. Do mediocre on one and its almost over unless you dominate the other 4. Don't believe the BS that you can fail one and do mediocre one another as long as the other 3 are fine. The stories of people failing/doing mediocre on one or two and still getting an offer are likely because they are women or are non asian minority.

by Expert (107,550 points)
0 like 0 dislike

 

 August 4, 2020

Google Telephonic interview experience.

I was approached by a Google recruiter on Linkedin for software developer opportunity. I was not in touch with my DS and Algorithms so asked 4 weeks of preparation before appearing for the telephonice. As I always had this in the back of my mind that Google interviews are designed to select the best so I started going for Hard leetcode questions.

 

I solved around 75 questions mostly hard and few mediums covering mostly DP, Graph and arrays. And then I took the telephonic.

 

Telephonic Round

 

Interviewer was very polite and after some introduction straight directly to the question. It was a variation of this problem https://leetcode.com/problems/validate-stack-sequences/. I was able to come up with n^2 approach and he asked me code it. While coding I suggested him that we can do better by using the property of stack. After discussing he asked me to code and then I don't know what happened I got totally blank and was unable to complete the code.

 

After few days got a call from the recruiter already knowing that what was the result. And she told me that everything was perfect apart from the coding part but since it was an essential requirement they won't be moving ahead.

 

Tips - Don't treat Google interview any different. It is a normal DS Algorithm interview and should be approached liked that. Also don't solve any questions on the day of the interview (I did and was not able to solve few so was already down on confidence when I gave the interview)

 

by Expert (107,550 points)
0 like 0 dislike

 

Google Application Engineer Interview

I am currently interviewing for Google Application Engineer role(India). Had 2 problem solving rounds. Feedback was positive. Recruiter told me the next three rounds will be:
System/ Application Design
System Integration
Googlyness And Leadership(Non Technical round).

 

I am aware of System/ Application Design, but don't have much idea about what will be covered in the System Integration round. If anyone has given this interview round before, please tell me what type of questions are asked in this round.

 

Also, does anyone know how different is the Application Engineer position compared to SDE position in Google?

 

Any help is greatly appreciated :)

by Expert (107,550 points)
0 like 0 dislike

Google | L4 | Jul 2020

Had my Google Virtual Onsite last week.
Update: moved forward to hiring committee

 

Round1:
Got a directed graph traversal problem and used DFS to solve it. Had a really great conversation with my interviewer and he nodded constantly. I finished like 20 minute early and the interviewer was like: "OMG, we still have 20 minutes". I started to explain the BFS approach and in the middle the interviewer remembered a edge case and asked me how would I solve it. I stumbled a bit, he gave a hint which I clicked and solved and explained it.

 

The interviewer seemed happy with my approach and we had the last 10 minutes just chatting. The problem was a medium level.

 

Round2:
Got a matrix related + trie problem. I explained my approach and started implementing it. Ten minutes into the approach the interviewer gave me a small hint which again I clicked and immediately changed a lit bit of my implementation which the interviewer seemed happy. I made some small programming joke and we both laughed.

 

The interviewer seemed ok with my approach and I did finish the problem. This problem was more of a hard level.

 

Round3:
Got a sliding window problem. Had to ask a lot of clarfying question and started coding up the solution I proposed. The interviewer was quiet for most of the time. After I finished the solution he was okay with it and we moved on to a followup and I coded it out quickly and he was okay with it.

 

The communication was okay but I couldn't really connect with the interviewer since he was a bit quiet. This problem with the followup is a medium level problem.

 

Round4:
Got a nested recursive problem. I gave a lot example to clarify, the interviewer was mostly quiet. I finished super early with like 15 minutes left and we started optimizing the return type of function. Last 10 minute was just chatting and it was great.

 

The interviewer was nice but a bit quiet. This was definitely a hard level question.

 

Round5:
Chatted with a manager and we laughed a lot. Also of all my behavior interviews, this was the only manager that had interest in my side projects which accumluated a few hundred stars and was reported by multiple tech medias.

by Expert (107,550 points)
0 like 0 dislike

October 12, 2021

Google India L4 [Offer]

YOE : 4

 

Before Google I did ~120 LC (20,80,20). Will not be going into specifics due to NDA etc.

 

Language used : C++

 

Phone:
Basically a simple DFS problem similar to islands one. Follow up to the same question needed Disjoint set approach. Did well here as DFS and Disjoint sets are both super easy to implement.

 

Virtual onsite

 

Round1:

 

A trie based question with added complexity of generating random numbers with trie. Did well here, took me some time to come up with a good solution for randomness. The credit also goes to interviewer who helped with hints at right places.

 

Round2:

 

Question that has topological sort at its core. Also the follow ups needed some modifications to the same implementation. Not very difficult if you are thorough with all variants of top-sort implementations. This turned out to be my best round.

 

Round3:

 

An array problem that has prefix sum at its core. I struggled a bit with different approaches, but with hints from interviewer, could come up with the wanted solution.

 

Round4:

 

A medium variant of merge intervals problem. Did well to come up with all edge cases and this worked well. The interviewer did help with drawing diagrams for the proposed solution and cases which looked good in the end.

 

Round 5: Googlyness - Easy round.

 

Result - L4 approved.

 

My tips (apart from coming up with optimal solution):

 

  1. Communicate your thought process as much as possible. This really leaves a good impression.
  2. Write structured code and use OOPS wherever needed.

 

Thank you.

by Expert (107,550 points)
0 like 0 dislike

 

Google Software Engineer Intern

I applied for Google online and got interviewed last October. One thing about Google is that if you interviewed with them before, they keep record of you and this could potentially speed up the process. That what happen to me, I interviewed for Practicum last year and so, I got a reply fairly quickly after applying online and it's also took only 2 days for them to give me the decision. My interview was 2 phone interviews back to back. I had to write code on a Google Doc. I choose Java as my programming language.

 

Both interview was fine. I could understand well what the interviewers were saying. My first interview I was asked only one question which is implementing an algorithm for the Roomba to find ways around the house. This one was hard in my opinion. I end up didn't finish but got the gist of it. The second one was also a difficult one which require to build a binary search tree to get the answer. Fortunately, I have done similar problem and was able to finish this one well before the time limit.

 

I got to the Project Matching round 2 days after the interviews, but didn't manage to get a project.

by Expert (107,550 points)
0 like 0 dislike

 July 10, 2019

Google | Intern | California [Reject]

Phone Screen 1:

 

  • Given height,width output the following sequence of characters:
    A,F,G
    B,E,H
    C,D,I
  • Given an asynchronous function f(data,callback) , implement a function p(n,f) which executes function f , if it gets result return it, else retry function f n-times and if fails(after n-tries) return error.

 

Phone Screen 2:

 

 

2nd Interview went very well, i was able to come up with 2 way BFS solutions and interviewer seemed satisfied.
I screwed up first interview because of 2nd question (asynchronous) .
The interviewer's were very kind and helpful .

by Expert (107,550 points)
0 like 0 dislike

February 2, 2021 

Google | SDE L4 | Bangalore

I have recently(Nov 20-Jan 21) given interviews with Google for L4 position for Bangalore location. There were one Screening round, four technical rounds, and one Googleyness round. Please find the overview of the rounds -

 

  1.  

    Telephonic screening

     

    • The interviewer asked a merging intervals based question and after asking follow up questions, this has become a standard array based approach. We have discussed a bit on the different approaches and finished the code just in time. In the feedback, Interviewer has noted that there can be little improvement in the cleanliness of the code.
    • Recruiter has asked me to prepare for five virtual onsite rounds. 4 based on Data structure & Algorithms, and 1 on Googleyness.
  2.  

    DS & Problem solving 1

     

    • This round went really well. The interviewer has asked a shortest path based application with lot of constraints. I have given Djikstra's based solution and he seemed convinced. Later, he has added a follow up, we have discussed possible approaches, settled on one and coded for the same. While dry running the code, I have found an issue and corrected it. Interviewer seemed contended about that.
  3.  

    DS & Problem solving 2

     

    • Interview has asked a question about CPU-Job scheduling where each job would have different queuedAt timings and some other constraints. We need to come up with an ordering in which CPU would process them. I have given a priority queue based approah and the interviewer asked a follow up. I've spent good amount of time on the follow up. Interviewer has remarked that I was in the right path and in the interest of time, he has asked me to code for the first case. I have finished the code but missed an edge case (pointed out by the interviewer)
  4.  

    DS & Problem solving 3

     

    • Interviewer has asked a Binary search/TreeMap based application and I was able to give the optimal approach for the same. He has asked me to write a production ready code and I have completed the code with an exception of one helper method's implementation. I have handled all the edge cases and null checks as I was asked to write production level code.
  5.  

    DS & Problem solving 4

     

    • This round went relatively bad when compared with others. Interviewer has asked me a question related to Tress and DFS with lot of constraints. I was able to provide the optimal approach. She has pointed couple of issues in the code and I was able to correct them. After the corrections, she seemed to be satisfied with the solution.
  6.  

    Googleyness & Leadership

     

    • This round was more like a discussion where both the parties can ask question about each other. I was asked about any project that I have recently delivered and how I prepared for handling failure cases/ obstacles. And, there were hypothetical questions about how I would handle customer reviews, difference of opinion, and my motivation for work.

 

After a couple of days, the recruiter has informed me that they want to forward the packet to the hiring committee. But before that, they have to do team matching. In the later week, I have spoken with couple of managers and one of them was interested with my profile. So, waiting for the hiring commitee's decision at the moment.

by Expert (107,550 points)
0 like 0 dislike

Google | Onsite interview questions

I recently went through a Google interview and wanted to contribute the questions I faced.
Note: Google has apparently changed its interview slate, there weren't any system design interviews and all are coding questions. Might have to verify this clearly with your recruiters.

 

Round 1:

 

 

Round 2:

 

 

Round 3:

 

  •  

    Given a tree representation of a html parsed output, wherein every block is a node in the tree, find if two html docs contain the same text.

     

    Explanation : 
  • 	struct Node {
    		   string value;
    		   bool isMetadata;
    		   vector<Node*> children;
    	};
    

     

    For eg, consider the two documents

    sample

    Hello world

    will be represented as Node1: value sample, children: isMetadata: true Node2: value: children:

    isMetadata: true Node3: value:

    : children: Hello world isMetadata: true Node4: value Hello world isMetadata: false

    and a second document

    Hello world

    and both documents are equivalent since they contain the same data.

     

    Note: the case of both documents fitting in memory is trivial, since it is just walking this tree list, consolidating data and comparing. As a follow up, solve the case where the whole documents may not be able to fit in memory

    Round 4:

 

  •  

    Given a 2D matrix M X N, support two operations:
    Query(row1, col1, row2, col2) such that I get the sum of all numbers in the rectangle ((row1, col1), (row1, col2), (row2, col1), (row2, col2)) and
    Update(row, col) to a new number

     

    And query is a very frequent operation and update is a rare operation, so query should be really fast, but update can be slower.

     

    Follow up: How would you solve this in a distributed fashion

     

 

Round 5:

 

by Expert (107,550 points)
0 like 0 dislike

August 4, 2020

Google Telephonic interview experience.

I was approached by a Google recruiter on Linkedin for software developer opportunity. I was not in touch with my DS and Algorithms so asked 4 weeks of preparation before appearing for the telephonice. As I always had this in the back of my mind that Google interviews are designed to select the best so I started going for Hard leetcode questions.

 

I solved around 75 questions mostly hard and few mediums covering mostly DP, Graph and arrays. And then I took the telephonic.

 

Telephonic Round

 

Interviewer was very polite and after some introduction straight directly to the question. It was a variation of this problem https://leetcode.com/problems/validate-stack-sequences/. I was able to come up with n^2 approach and he asked me code it. While coding I suggested him that we can do better by using the property of stack. After discussing he asked me to code and then I don't know what happened I got totally blank and was unable to complete the code.

 

After few days got a call from the recruiter already knowing that what was the result. And she told me that everything was perfect apart from the coding part but since it was an essential requirement they won't be moving ahead.

 

Tips - Don't treat Google interview any different. It is a normal DS Algorithm interview and should be approached liked that. Also don't solve any questions on the day of the interview (I did and was not able to solve few so was already down on confidence when I gave the interview)

by Expert (107,550 points)
0 like 0 dislike

 September 23, 2020

Google[OFFER]:
Anyway, a Google recruiter reached out to me via LinkedIn early June. I thought it was a spam/phishing profile because there is no way my resume/LinkedIn profile looks impressive enough for Google. He was indeed real and I scheduled my telephonic round with them for after a few weeks. I thought I had no real shot with them but I will work my hardest and try to clear just the telephonic round, that itself will be a big achievement for me. Plus I knew if I prepared for a Google level interview I could clear any other interview. So once again, I started doing LeetCode 24*7. This is all I thought about. I only wanted to give this my best shot, for once work really hard for something and not be that person who leaves things for luck. The support from my family and friends helped me go a a long way.
I had my telephonic round and I thought I did terribly. I wrote some messy code, and later I realized it was supposed to be Dijkstra. I drank some scotch that night and went to sleep, knowing I would be getting a rejection email the next day and that I am probably too dumb for this anyway. However next day my recruiter calls me to tell me they want a follow up. I was delighted to know my bad performance wasn’t bad enough for them, and that maybe I am improving and am not as bad as I think I am. I worked non stop for my next telephonic round. I passed that with flying colors. I was feeling very confident with my prep and now had my eyes set on that final virtual onsite.
Luckily for 2-3 years of experience, they don’t test you on system design, so this meant one less thing to worry about. I took mock interviews with friends. I redid all my solved problems multiple times. I had done around 250 questions by the time of my virtual onsite (3rd week of August). I was extremely thorough at those questions and knew them inside out. I definitely took advantage of the company tag on LeetCode which was very useful (got some questions from them in my interviews).
Day of onsite: Google has 45min interview + 15 min break. This is so wonderful, it gives you time to destress yourself by closing your eyes and clearing your head. First four rounds went well, but my final round went horribly. I had no connect with my interviewer and till now I don’t understand what his question really was. I was prepared for a reject. Google recruiter reached out after a week saying feedback looks positive and they will be moving to HC. After a few days, HC approved me for L3. I didn’t care, I would take a janitor’s job at Google. Plus with all the smart people there, I would rather over-perform at a lower level than under-perform at a higher level and risk being fired. I had my team match a week later and got to know that very day that the team wants to move forward.
I cried with joy like I had never before. Had my dream really come true? After years of being disappointed with myself was I really about to achieve something worthwhile? I had really gone from someone who lacked motivation and discipline to clearing some of the toughest interviews out there. I signed my offer letter after a week and am still celebrating. I thanked my Google recruiter as he was the most professional and patient person I have ever dealt with. Google recruiters are top notch professionals which really gives you a good idea of the quality of people Google hires.

 

Key takeaways:

 

  1. LeetCode premium definitely helps. In an ideal world questions would not be repeated but there is definitely a pattern and some questions/topics are more popular than others. In this hyper-competitive world we should take advantage of all the resources that are at least easily available to us.
  2. Consistency, discipline, smart/hard work, focus will take you further than you think. Persistence and perspiration trump talent.
  3. Failure, rejections is all a part of life. No rejection or offer defines us. Remember, we only fall down so that we can learn to pick ourselves up again.
  4. Life is not a sprint, it is a marathon. It is not only about the destination, it is also about the journey.
  5. If I can, anyone can!
by Expert (107,550 points)
0 like 0 dislike

December 17, 2021 

Google | Virtual Onsite | L4 | Fail

YOE 3
Location US

 

Behavioural
3 questions with a focus on diversity/inclusion.
How would you design/test a product to make sure its diverse/inclusive to all users
Tell me about a time where you changed a person's bias.
Tell me about a time where you had to accomodate for another person's working style.

 

Coding 1
The interviewer for this round was awesome. Gave hints and I felt like they wanted me to do well.

 

Q1
For a given string, check whether a string is "smashable". Smashable means whether a word can be reduced to a single character, which is in your predefined dictionary of words, and every intermediate word during the reduction should also lie in the dictionary.

 

For example -
Given: SPRINT
PRINT
PINT
PIT
IT
I

 

Followup: Make this more efficient(memoization)

 

Q2
You have a clock with the following functions.
getCurrentTime()
advHour()
adv15min()
adv5min()
adv1min()

 

And a time class to represent the time (12 hour with am/pm).
class Time {
int hour;
int min;
boolean am_pm;
}

 

Implement a function to set the clock's time to a given time in the least amount of operations;
int setTime(Clock clock, Time time)

 

Coding 2
Interviewer for this round was less helpful. Didn't give any hints.
Given a calculation class where you intialize values for a,b,c and the following function f(x) = ax^2 + bx + c, and a list of numbers, apply this function all values in the list.
class Calculation {
int a;
int b;
int c;

 

int[] calculate(int[] arr)
}

 

Followup: We want the output array to be sorted. Can we do better than O(nlogn)?
I think you are supposed to find the inflection point of the function using binary search then use a 2 pointer approach to sort the output array in O(n).

 

Coding 3
Worst interview experience I've ever had. No problem statement given or any examples. Just asked me how you would delete something from a tree.
This was what I was given:

 

class TreeNode {
int parentIndex;
// data
}
List nodes;

 

At first I thought he wanted me to implement delete in a binary tree. If that's the case then TreeNode should have a reference to its children.
I thought ok I can iterate through the list to delete the node and I'm done, I didn't even think about the parentIndex at this point.
Then he finally clarified that the parentIndex inside the TreeNode references to its parent node in the list.
Finally we get to the real problem. He asked me again how I would delete a node from a Tree taking into consideration the child nodes of the node that's deleted.
What a waste of 15 min. I think calling the class TreeNode was to intentionally mislead me into thinking this was a normal binary tree question.

 

There are three things we can do to the children nodes of a deleted node, delete all its children, promote a child to be the new node and maintain the structure or make the deleted node's parent the parent of these nodes.
He asked me to choose one to implement.

 

At this point I knew my chances at Google were gone because I was already pissed off by his attitude and wasted way too much time getting to the real question.
I chose option 1 and failed to implement it. The hard part is updating the parentIndexes of the nodes that remain because every deleted node could change the parentIndex for nodes before/after it.

 

Coding 4
At this point I already gave up. I knew my second coding round didn't go well and neither did the last one.
Interviewer this round was nice and gave the problem statement and an example.
Calculate the minimum time it would take for a car to go X laps around a racetrack given a collection of tires

 

A tire can finish a lap in t time but every subsequent lap will take longer because of degradation.
Tire {
double t
double d
}
Tire1{2, 2}
Tire2{4, 1.5}
Ex for 3 laps
Tire 1 = 2 + 2 * 2 + 2 * 2 * 2
Tire 2 = 4 + 4 * 1.5 + 4 * 1.5 * 1.5

 

The more laps you do, the bigger the degradation, resulting in taking more time to complete the lap.

 

Followup: What if we can do a pitstop every lap and switch tires but it will take P time to do the pitstop?
How would we calculate the minimum time now?
Looks like some hard DP problem to me. Wasn't able to solve.

by Expert (107,550 points)
0 like 0 dislike

 

Google | L5 | India | Dec-2021 | Offer

YOE : 12
Current Organisation : FAANG
College : Tier-1

 

Interview Experience

 

Due to NDA I wont be posting exact questions but will try to cover the topics involved.

 

Telephonic
One graph problem which was a variation of course schedule. Completed in time. Discussion on time complexity in detail. Got positive feedback.

 

Round1(Coding)
A Problem based on streams. Data coming in form of string in streams, implement some mathematical functions based on some conditions. Question was of medium difficulty (Not on leetcode) and I did it in time but made a syntactical mistake which resulted in a No-hire. I was shocked to hear that interviewer rejected me for a small syntactical mistake which he termed as a struggling in fundamentals(LOL) in feedback. Interviewer was late and wasnt prepared for the round. He instead asked me which round is it :). Sometimes bad luck costs a lot.

 

Round2(Coding)
Question was a variation of parallel courses but with a modification. I tried dfs, UF but solved it quickly using Topological sort. I couldnt find any other solution for this till date. Since time was remaining, detailed discussion of time complexity was done wrt problem and on general time complxity of TS. Interviewer looked very postive but gave a leaning hire to my surprise citing innovative but complex algorithm.

 

Round3(Coding)
Question was based on design involving signed and unsigned integers. Corner cases needed to handle integer overflow.
Did the question in time with correct complexities discussed. Question was of medium difficulty but not present on LC. It was a hire call.

 

Round4(Design)
A one liner vague statement was provided with all the requirements expected to be generated by me. Problem was a subset of designing a system like S3 but this was left open ended to evaluate if candidate can go to those details. Lots of detialed discussion to the solution. Every layer of solution was discussed in detail. Disaster recovery, Availability, Consistency were touched in detail. It was probably the best round for me with interviewere appreciating multiple times for details covered. It was Hire.

 

Round5(G&L)
Apart from standard questions, it was a deep dive in work done till now. Some cross questioning was done on the projects done. Answered them effectively. Got a hire.

 

Team match was done before HC and matched to 2 teams. HC asked for 2 additional coding rounds due to one negative feedback.

 

Followup Round 1 (Coding)
-Tell me an interesting technical work you have done recently and was discussed in detail for around 15 minutes.

 

  • Design question around tcp packets coming randomly. I was told that it cannot be completed in time but core logic is needed.
  • Multi-threading discussion around the core logic was done.

 

Overall interviewer was impressed. I gave 3 approaches to solve the problem. Got a Hire.

 

Followup Round 2 (Coding)

 

  • Tell me a technically challenging problem you have solved in your career and it was discussed in detail. A simple problem around counting was given and java collections were discussed in detail in terms of time and space complexity. Problem given was vague and interviewer was expecting handling of tradeoffs between space and time. Gave the solution and we moved on.
  • A backtracking problem which is on LC but I had never imagined it to come. Problem was lengthy and interviewer told that time left isnot sufficient to complete it but he wants to see core logic. I completed the problem to a logical end where interviewer said he is satisfied and went on for multithreading implementaiton of the solution.

 

Interview discussion was very vague and context was changing frequently. I had some appreciations which made me think it was a hire and in the end it came as a hire. I kept alive the conversation despite me struggling a bit initially which helped me a lot.

 

Team matching was done again and I got a hire from HC for L5.

 

Recruiter was friendly enough to let me know individual round feedbacks which helped me to not to repeat mistakes.

 

Learning :

 

  • All 8 rounds had one liner statements. I was expected to generate question.
  • Google definitely looks for speed. I was given a plus in all except one (NH)
  • Solution shouldnt be complex, they point out in feedback and it hurts your chances in HC.
  • Be ready with time complexities.
  • Dont take hints, every hint will be mentioned (I didnt took any though) and will lower your overall rating.
  • Use meaningful variable names, I was given positve feedback for this.
  • Self test the code before interviewer points out. I gave a pause of 10 seconds after code was completed and interviewer pointed me out and mentioned in feedback though as minor concern.
  • Everything you say is generally noted down and it comes in feedback.
  • Dont let silence even if not able to come to a solution. Silence will have a negative cost in rating.
  • Dont jump to answer quickly but dont let silence creep in. Speak up your thoughts.
  • Luck is as important as preparation.

 

Solved 551 LC (60 H, 126 E, 365 M) in an years timeframe. Focused on concepts more which helped me solve questions I had never solved. Based on others experiences as well, I focussed on quality rather than quantity and it helps for sure.

by Expert (107,550 points)
0 like 0 dislike

Google | L3 | Bangalore | Nov 2021 [Offer]

YOE - 1.5-2
Position: Software Engineer L3
Location: Bangalore
Background: B.Tech in CSE from one of the older IITs, worked as a quant in a reputed HFT firm

 

Interview -

 

Phone Screen: 1 leetcode hard problem - BFS with a trick, one of the popular leetcode story problems. Was able to solve it optimally in the alloted time.

 

Round-1 : Hard backtracking problem involving a grid. Was able to give a solution approach and code it up. It had a few bugs though. Recruiter informed that the feedback from interviewer was borderline.

 

Round-2 : Data Structure design for a particular use case(medium-hard). Was able to finish up but required 1 small hint from interviewer. I would say my performance was average here.

 

Round-3 : 1 leetcode medium problem with 1 follow up(hard). Solved it optimally and explained my approach. I used a trick here which the interviewer asked to explain and I was able to dive deep into it. This was the best round.

 

Round-4 : Tree based question(medium) with a follow up(medium). Was able to solve it optimally within time inspite of some elongated resume based discussions at the beginning of round

 

Round-5 : Googleyness round.

 

Recruiter was very helpful and informed me beforehand that it was 90% confirmed that I would get an offer based on feedback. I was interviewing for both L3/L4 positions but L4 was difficult with this performance. I could have given it a shot with 2 additional rounds but I didn't want to get into a senior position without any prior experience in product based firms. I was picky about the role I wanted, so took some time in the team matching process until I was fully satisfied. The folks at Google were very helpful throughout the process.

 

My Preparations
I solved 400+ leetcode questions - medium and hard. I maintained G-sheets for all questions grouped by paradigms and revised them periodically. Along with that, I also used the resources at Leetcode discussions page to make personal notes which helped me a lot(the trick in round 3 was picked from there). The aim was not to solve all questions but to solve all paradigms. I had heard Google rarely repeats interview questions, but still practicing google tagged questions was helpful and gave me a confidence boost. Apart from that, general principles like good quality code and modular programming also help, both in interviews and prep.

by Expert (107,550 points)
0 like 0 dislike

Google | L4 | Hyderabad | Sep 2021 [Reject]

Status: Member Technical Staff in a product Based company, Chennai
Position: L4 at Google
Location: Hyderabad
Date: Sep 2021

 

Contacted by Google Recruiter via LinkedIn and gave the contact details. Recruiter contacted me via Phone and informed me of the recruitment process at google and sent a link to apply to. Recruiter also sent links for preparation and suggested coding platforms like leetcode(Medium to hard Level suggested). Recruiter gave me a month to prepare for the Phone Interview.

 

Phone Interview :

 

The problem was divided into 3 parts and the interviewer added complexity one by one till the end. It is an LC-Medium difficulty problem. (Didn't see any related problem on leetcode ). If you know basic traversals you could easily solve it.

 

Recruiter contacted me via phone and informed me that the last round went well and wanted to proceed to scheduling the next 3 rounds of Onsite interviews out of 5 rounds. If the next 3 rounds trends positive then they will schedule for Googliness and final technical Interview.

 

For the phone Interview I was mostly concentrated on solving medium difficulty problems from Google Tagged questions for the last 6 months.

 

Onsite Interview

 

Round 1 : Coding

 

LC - Medium problem with find and replace on a string. Was able to solve all the edge cases within time. Feedback was positive from the recruiter.

 

Round 2 : Coding

 

LC - Hard problem based on 2d Grid. Was not able to solve it completely and the feedback was bad from the recruiter.

 

Round 3 : Coding

 

LC - Medium problem based on run-length encoding. Solved it within time covering all the edge cases. But the response from the recruiter was bad because the interviewer had another followup in mind. Interviewer has felt that I took much time in solving the easy part. This shocked me.

 

Recruiter contacted me again via phone and wanted to schedule the next 2 rounds and stressed that I need to do Extremely Well in the upcoming rounds because I had two bad rounds.

 

Round 4 : Googliness & Leadership

 

Standard G&L questions.

 

  • Assume your manager gives you a task to design a system. How would you do it ? How would you resolve ambiguity ?
  • Have you ever stepped up for the team ?
  • How do you resolve conflicts with your team members ?
  • Have you ever been in a situation where another team and yours were creating a similar product ? What happened ?

 

The feedback from the recruiter was positive. I had prepared well for this round using the STAR framework so nailed this round.

 

Round 5 : Coding

 

LC - Hard problem with binary tree traversal. Need to solve this in constant space. Even though I did it, the interviewer felt that I didn't do well because I missed some edge cases.

 

Feedback from the recruiter was negative and as I didn't meet the bar, my results were not sent to the Hiring Committee. The main negative from my side was the comprehension ability to explain my coding in a short time. Need to improve my ability to convey my thoughts quickly.

 

I prepared for 6 Months rigorously for Google and failed. But I got an offer from Amazon and accepted it. 

by Expert (107,550 points)
0 like 0 dislike

 November 20, 2021

Google | Phone Screen | Reject

Hi All,

 

I was interviewed at Google 2 weeks back, question was similar to "https://leetcode.com/problems/number-of-islands/" but due to nervousness I completly messed it up.
I came up with the approach right away but while coading dont know what happend..(in my mind: OMG I know this question..OMG I am giving interview of Google)...and then I forgot to write the most basic code..

 

By the end of interview I completed the code but I was already out of time

 

So wanted to tell everyone from my experience, just dont get nervous, just think "Google will never ask anything which you dont know"

 

Important thing is that you need to be focused and should be able to manage time.
And during an interview dont think you are giving interview of Google!!
Feeling bit low coz I coudnt solve the easiest question but I messed up, its life!!

by Expert (107,550 points)
0 like 0 dislike

Google -L4 Rejected

September 30, 2021

1st round - Given big integer array | find highest , lowest and latest numbers at any point(index).
follow up - delete integer at any index, find highest , lowest and latest at any point now.

 

Example :

 

array is like - 1, 4 , 5 ,2, 4
At the end
highest - 5
lowest - 1
latest - 4
Now, say 5 at index 2, 4 at index 4 is deleted
At the end, value changed to
Highest - 4
lowest - 1
latest - 2

 

2nd Round - delete string A from another string B until no string A left in B

 

example : B - abcbcddfg , A - bcd output - afg

 

3rd round - given list of string strList with a integer value , In each query, suffix and prefix is given . find the string from strList which have suffix and prefix given and having highest value if more than one string matches.

by Expert (107,550 points)
0 like 0 dislike

 

Google India | Onsite | L4 | Offer

October 18, 2021 

yoe 4+
Language: Java

 

My Preparation
1 month prep
Leetcode 70 questions 20 general, 50 from google questions asked in last 6 months LC. almost all I practiced were medium and hard

 

Learnings

 

Questions

 

  • Some questions dont have a single correct answer. They are open ended. Interviewer would like to see how you think of the problem and explaining why a solution you think of wont work will also be helpful
  • When you hear question, try to brainstorm edge cases and extent of problem for some time (approx 5 min)
  • Write test cases in start so you are clear of problem
  • I was asked to prove why the provided solution is optimal, so be crisp in your explanation.
    • I used to take a min to formulate argument and then say it aloud
  • Practicing leetcode really helped me in two aspects, it gave confidence and almost similar questions were asked
  • Mock interviews really help. It helps you understand where you get stuck in the interview process.

 

Coding

 

  • Practice coding without editor and try to follow the google style guides whenever possible
  • Create structs instead of using arrays to keep code clean and readable
  • I was pointed out for using List instead of Collection, but could be one of case but better to keep in mind
  • One of the questions asked was related to bytes and messed up a bit in byte operations in java
  • The coding editor provided is simple but helps you with braces and indentation, rest is yours
  • I wasn't asked to run the code but prep in a way that your code runs without any errors, since interviewers are very fast to point out
  • Make it a practice to read code and find errors before you say you are done.
    • In leetcode, you can do same before running the code for first time to practice
  • Prep to solve questions in 30 min on leetcode

 

Overall Interview Discussion

 

  • I am generally more talkative, so i used to take breaks and ask if i am thinking in the right direction to the interviewer if interviewer doesn't speak for 5 min. Not sure if this is good or bad so use your own judgement
  • Sometimes interviewers can get stuck on a solution, Do not get hyper that your interview is screwed. One bad interview is not always a bad sign, they will account for it. Keep calm and try to do as good as possible. The game is to be flexible

 

My Rounds: (Not sharing question details due to NDA )
Screening round
It was a simple question related to a LC medium in google list. The follow up was a open ended discussion and I had to prove why a brute force O(n) solution will be needed and logn binary search wont work.
Overall good round.
Got postive feedback in all aspects and decided to move on for the onsite. All the 5 rounds were scheduled in span of 3 days almost 20 days later

 

Coding round 1
Slight variation of LC hard problem. But I missed asking about variations to the problem and hence feedback was that I "overlooked some parts of the problem", but it is normal if you can work through solution. There were two follow-ups solved both quickly and coded for them
https://leetcode.com/problems/russian-doll-envelopes/

 

Coding round 2
This started with a java vs python discussion and we did some library coding for Iterators (almost like LLD) in java. I didnt understand the question properly as I misheard it. wasted like 5 min in that. My solution was working but minor errors. The way of writing code was something that interviewer didnt like, He asked me to clean up the logic, though I didnt understand what to clean up and told him so. Overall average feedback due to errors pointed by interviewer

 

Coding round 3
This I messed up. But had to do some mathematical calculations to prove bound of solution. It was similar to finding smallest missing positive integer in array.
https://leetcode.com/problems/first-missing-positive

 

Coding round 4
This was a simple greedy LC medium. Followups were also simple.
Similar to https://leetcode.com/problems/task-scheduler/

 

Googlyness

 

  • Behavioural round
  • Prepare general incidents from your current work. Your recrutier will share ample resources usually that is enough.
  • I'd recommend to write (or atleast speak aloud) your answers so you are crisp and sound confident
by Expert (107,550 points)
0 like 0 dislike

September 10, 2021

Google SWE Phone Interview (Reject)

Location - Google Ireland
YOE - 5 years
Role - SWE

 

I had a Google phone interview on 7th Sept 2021. The question asked was how to get maximum mutual friend suggestion on a social media.
For example, you should see a friend suggestion with maximum mutual friends.

 

I implemented it using BFS, by using a frequency map.

 

Node getMutualFriend(Node root){
	if(root == null || root.getFriends() == null){
		return root; 
	}
	HashMap<Node, Integer> freqmap = new HashMap<>();
	Deque<Node> queue = new ArrayDeque<>();
	
	queue.offer(root);
	
	while(!queue.isEmpty()){
		Node node = queue.poll();
		freqmap.put(node, freqmap.getOrDefault(node, 0 ));
		
		for(Node friend : node.getFriends()){
			queue.offer(friend);
		}
	}
	// logic to get maximum count mutual friend
	return freqmap.get(maxfriend);
}
by Expert (107,550 points)
0 like 0 dislike

Google L4 India [Reject]

December 23, 2021

Recently interviewed with Google India for L4 position. Can't discuss the exact questions, but can share the process.

 

Reached out by the recruiter and he then scheduled the the first phone screen.

 

The question was very easy (It basically involved traversing a 2d binary array). While the approach was correct, I missed some edge cases in the code. While fixing those cases I introduced more bugs.
A follow-up was then asked to optimise in best case scenario(worst case time complexity was still same). I correctly gave the binary search approach, but with one bug.

 

The result of this interview was borderline hire. Because of this reason, recruiter decided to conduct only 2 onsite interviews instead of standard 4 onsite rounds. He mentioned if I repeat the same mistake of missing edge cases/bugs, the loop will be cut short here itself.

 

The first onsite was one of the hardest questions I encountered. I'm pretty sure even with months of prep, there was no way I could have solved it in 45 minutes. It involved traversing an HTML which was in the form of a tree. While I could complete this problem with struggle, the followup of the problem was really hard and almost impossible to complete in 45 minutes. Understanding the followup itself took about 10 minutes.

 

The second onsite I was asked only one problem regarding dependency resolution. I provided a DFS solution with so much struggle and multiple bugs (later on came to know that it is solved by topological sort).

 

As expected, the result was a no-hire with a cool-off period of 1 year :(

 

The mistake I made was not preparing and practicing before appearing for the interviews. My phone screen and 2nd onsite would have been much better in that case. However the first onsite would still be hard, but considering all feedback, I would have probably got a chance for full 4 interview onsite loop.

by Expert (107,550 points)
0 like 0 dislike

Google | Early Careers | CANADA | ONSITE | [REJECT]

 December 24, 2021

I am from India and I interviewed at Google, Canada (VIRTUAL) a month back and got rejected by the HC. I am trying to compile the resources and preparation strategy (I got rejected, but my preparation strategy, the learnings from my mistake would help someone). I won't be sharing any questions as I would like to honor the NDA but still make sure I can give something back to fellow leetcoders.

 

The Application
I applied through the careers website (after getting a referral). It is important to note that if you are getting a referral, wait before you get the referral email, else it won't be attached. I applied to Early Careers at Mountain View office and Canada office (honestly, it was random, I was totally fine working anywhere). Because of visa issues, my application at MTV got turned down and I was told to interview for Canada.

 

Phone interview
It was a 45 minute call through hangouts with a google custom made interview portal (supports syntax highlight, but no autocomplete).
The question can be said as Leetcode medium. It was based on priority queue and linked list.
I was able to solve and communicate effectively and moved forward to the onsite.

 

Onsite interviews
4 rounds --> 1 Googlyness, 3 technical.
My interviews were scheduled over 2 days since I was in India and my interviews were at late night.
Googlyness -> Just be the person you are, if you are not a jerk this round should not be a problem. Simple and leadership related questions. Follow Jeff H Sipe on Youtube for more insights about Google interviews in general.

 

Technical --> All rounds had two questions. A leetcode medium with a hard followup. All my questions were graph based. The last round had a more design + code approach to it (still uses DSA)

 

Interview verdict
I was scheduled for 2 more interviews since there were missing data points.
The first round had two questions. First one was Graph based the second one was Deque based This round went super good. I was able to solve with optimizations and fully code.
The second round had just question. This is the round I felt that dragged me down. It was a very implementation related question. (The logic was pretty easy, but there was a lot of corner cases which I should have handled).

 

Got rejected after 2 weeks :D

 

Learning from mistakes

 

  1. When you are applying for an internation offer, make sure you are comfortable with the time zones you are planning to interview at. Squeezing my brain at 1 am in the night did not work out very well for me during the interviews. I could have done much better. (Again the mistake is on me, I should have practised more at this time zone)
  2. Get leetcode premium or borrow it from a friend (It is worth it! It gives you a kickstart and sense of the actual questions) DISCLAIMER: You probably will not get direct LC questions, but it ll be a bit similar.
  3. CONCENTRATE MORE ON GRAPHS! I highly reccomend William Fiset's youtube channel for this.
  4. Be very well prepared before scheduling the interviews. Google will give you ample amount of time to prepare, don't make the mistake I did. When my interviewer asked me for dates to schedule the interviews, I gave the earliest possible dates which was available. This gave me only around 5 days to prepare. For some reason I was thinking if I would be judged if I take a lot of time. But this is not the case. Don't be so hard on yourself. Take your time and prepare

 

What went really good

 

  1. I was thinking out loud through all the interviews and made sure the interviewer understands my approach before hopping on to coding. (You should too. The last round, I got a bit dozed and did not do this as well and that could have been a reason that I got rejected)
  2. The Google interview process is long but it is filled with learnings and is a great experience. The only negative thing is I did not get any feedback.
  3. The great thing about the google process is, you learn a lot as an interviewer also. You can learn how to conduct great interviews at your organization. (I assume you are working)
  4. The recruiter is there to help from day one of the process till the end. Any doubts or questions, you should feel free to follow up.

 

Resources

 

  1. William Fiset's youtube channel for Graphs
  2. Jeff H Sipe's youtube channel for general google interviews
  3. NeetCode youtube channel (whenever I got stuck on Leetcode problems)
  4. LEETCODE DISCUSSIONS ! (UNDERRATED RESOURCE)

 

ALL THE BEST IF YOU HAVE YOUR INTERVIEWS COMING UP!

by Expert (107,550 points)
0 like 0 dislike

Google | Onsite | India | Dec 2021 | [Reject]  January 17, 2022

Work experience: 2.5 years at a semiconductor product based MNC as developer.
Screening Round Experience

 

Onsite round 1: 1 question -> 23/11/21 (45 mins)
Interviewer was from Google India.

 

Question: Given a 2D matrix of numbers, where rows are some card and columns are properties (value of properties ranges from 0-2), find whether given card combination form a valid set.
Valid set: They all have the same values or have all different values for each property.
Ex:

 

Example 1
Card 1: (0, 2, 0, 0)
Card 2: (1, 1, 1, 2)
Card 3: (2, 0, 2, 1)
Ans: Valid set

Example 2
Card 1: (1, 2, 0, 0)
Card 2: (1, 1, 1, 2)
Card 3: (0, 0, 2, 1)
Answer: Invalid set

 

Gave a solution of traversal of whole 2D array and keeping a hashmap for every properties column. Interviewer seemed satisfied.
Time: O(n.p) n=card num, p=no of properties
Space: O(n) , n=num of card

 

Followup question 1: Some values of properties were now replaced with wildcard star. Gave a similar solution by just adding one extra check statement.

 

Followup question 2: Pick a combination of 3 cards from the total set which are valid set. Gave a solution of firstly finding unique cards then checking for valid properties. Gave a O(n.p) solution. She seemed she was expecting a more optimised approach, and I was nearly blank by the end.

 

Time: O(n.p + n.3 * 3.p)
Space: O(n+3) , n=num of card
 

 

Onsite round 2: 1 question -> 23/11/21 (45 mins)
Interviewer was from Google India.

 

Question: Decision based DP question. Like House robber or Buy and Sell stock 4. Gave a recursion based memiozed approach. Ran it on his multiple test cases. Interviewer was impressed and didnt asked any further.
 

 

Onsite round 3: 1 question -> 24/11/21 (1 Hour)
Interviewer was from Google India.

 

Question: Given a n-array tree, for every query of type a b c d, give what will be the size of resulting trees if edge between a and b and between c and d are removed.
Note: Every removal of nodes is valid for only that query. Which means after a query is done, tree goes back to initial state.
Ex:

 

For tree
                       1
				2             3
			4  8    5      6      7
			
Query: 4 2 1 3
Result: [1, 4, 3]
Explain: On removing the edge between 4 and 2 two trees are formed of 1 and 7 size and on removing the edge between 1 and 3 final trees formed are of size 1 4 3

 

First gave a solution of tree traversal for every query which was O(n.q), n is tree nodes and q is no of queries. Later gave a solution of creating a data structure of parent child information (similar to union-set, though i didnt knew at that time), where this fetching of who is parent and who is child was done in O(1) and subtracted that size of child with parent to give the result. So for q queries it was O(q). Later found it was failing for a few test cases where a b c d of query was intermixing. Handled those cases separately. Interview has overshoot the time of 45 mins by 15 mins. Interviewer looked okay though not very happy. Maybe he was expecting some other method.

 

Time: O(q), q is no of queries
Space: O(n), n is no of nodes
 

 

Onsite round 4: Googliness round -> 24/11/21 (45 mins)
Interviewer was from Google India and the questions were senario based hr questions.
 

 

Update: Got the rejection call from recruiter. Got 2 positive review (round 2 & 4) and an avg (round 1) and negative review (round 3).

by Expert (107,550 points)
0 like 0 dislike

Google | Phone | SWE-India

 February 8, 2022

I had my telephonic round today.(45 Min)

Question's were:

  1. Given text and the width of a page, find how many lines the text would take on that page.
    I gave the Solution (Similar to Text Justification on Leetcode)

 

https://leetcode.com/problems/text-justification/description/)

 

  1. Given a text data that you’d like to put into a two-column table on a fixed-width page, find the best column size that minimizes the overall height of the table.

 

--> This was the follow up Question.(I gave the solution Using Binary Search)

by Expert (107,550 points)
0 like 0 dislike

Google| L4 | India | 2022 | Rejected 

February 25, 2022

Had the Intial Call with Recruiter In Jan-2022 , conducted small meeting to explain the process. The process is as follows-

 

Telephonic Screening (45 min technical)
Three Virtual Onsite Rounds (45 min technical)
Final Virtual Onsite Round (45 min) googlyness.

 

As i was having offers and already on notice period, recuriter skipped the Telephonic Screening.

 

1. First Virtual Onsite (Feb 2022)- It Started with introduction, then started with problem it was kinda of puzzle on equation. The problem was pretty vague, had hard time unserstanding what will be the input and output.For the first 10 min i was implementing a different part of the problem which was not required , interviwer stopped me in the mid way and told me you are solving a different problem which was not required. Then i asked claryfing Question, understood the problem, then started coding again. Was able to solve the problem at last. interviwer was satisfied, Then asked Time Complexity, and Test cases.
Problem is not available anywhere and was based on Real World Problem
Learning-> Don't start coding , until u have understood the problem very well. Keep Patience and Don't Rush.
FeedBack No Hire: Stuck half of the time solving problem which was not required to solve

 

2. Second Virtual Onsite (Feb 2022)- Started with Introduction. Problem was on Binary Seach.
When i was reading the problem Description , i almost had the idea how to solve this, as i have already solved similar type of questions on Leet Code.(I was 50 % sure)
But I this Time I did't rushed, asked claryfying Question, went to the depth of the Problem. Now i was 100% Sure this binary Search Template can be applied. Wrote the Code , stated the complexity.
There was still 20 mins Left, Then Follow up Question was asked on the same problem.
Problem is not available anywhere and was based on Real World Problem
FeedBack Hire

 

4. Fourth Virtual Onsite (Feb 2022) GooglyNess- : To be Honest, i was Really Scared for this round. But this was just a Cake Walk as Interviwer was really Friendly. I Talked with my heart open.
FeedBack Strong Hire

 

** [UPD]***3. Third Virtual Onsite (Feb 2022)- : Given a Set of Command in form a String , Needed to write a function to check of Command String is valid.
I was all over the palce, Pure Implementation Question. There were so many checks that need to be checked , Wasn't able to complete the question. Probably a No Hire In this Round.
FeedBack No Hire

by Expert (107,550 points)
0 like 0 dislike

GOOGLE | SWE NEW GRAD | [Rejected]

February 15, 2022

I am writing down the whole experience. As it might be useful for anyone aiming for google or any giant tech. I interviewed with them at the end of by 7th semester during undergraduation. (Currenlty I am in my 8th Semester)

 

A random evening, I recieved a call from a google recruiter. Firstly she apologied for calling up late evening. She said her team was impressed by my linkedin profile and wanted to reach out. Then she checked their database wherein I applied for an opening around 8 months back. So they got my contact details. She also said that for some candidates, they directly move to the onsite rounds rather than phone interview if the profile is impressive. And I was one of those!

 

I agree that I have a good prior project and internship experiences and have been contacted by many HRs through Linkedin. But GOOGLE was beyond by dreams. To be honest, at the first glance, I thought it was a prank call, so asked her to email me the job details for which they want to interview me. She did the same and schduled by interviews within next couple of days.

 

It was a long shot also, didn't had enough time for preparation. I tried to prepare mentally to face it though :)

 

All rounds are strictly of 45 mins. They hard stop there! Sharing all the rounds experience, won't share the exact questions as I have signed NOC.

 

Onsite ROUND -1
TECHNICAL ROUND

 

Interviewer was Senior SWE at Google. Didn't turn on his camera as he was having bandwidth issue. Started with his introduction followed by mine. Gave a question staight away. Based on doubly linked list. It was Easy to Medium level question.

 

I took some time to undersatnd it and then explained my approach. He asked about corner cases. After seemed satisfied, asked me to code it. I did it pretty fast, but then missed a corner case, he asked me to recheck, then I spotted it out.

 

Then he asked about my projects and had some discussion on prior internships. Interview ended with if I had any questions for him.

 

Onsite ROUND-2
Googlyness

 

Conducted by Senior Software Engineer at Google. Project Discussions and Behaviorial Questions to check if your values align with that of their's. Think and answer wisely.

 

Onsite ROUND-3
Technical Round

 

Interviewer was SWE at Google Cloud. She didn't introduced her nor asked for mine. She doesn't seemed friendly at all. I became a bit nervous. She jumped to DSA question. Just verbally gave a question something regarding git commits and asked my approach.

 

I tried to think and clearify the question. Then she wrote the question on the coding doc. I understood what she wanted to ask, I gave a binary search approach. She didn't interact much so I don't know if I was on right track. She said to code down whatever I explained. I did it. Then she asked me to explain my code, while I was doing, she doesn't reacted, so it was difficult for me to understand if I was able to make her understand what I wanted. She said, she got what I was doing and lets move to next question as only around 12 minutes to complete the 45 minutes session were remaining.

 

The next question was related to system streams of input. I clearified my doubts but since no sample test case was given, I was struggling to get what exactly is asked. I asked her if she can give me a sample test case. She did so. After looking at sample input I quickly thought of a dynamic programming solution. Explained it to her. She asked me to write the dp equation and complete the function as soon, because we didn't had enough time. She asked about complexity and what my dp vector does etc. The interview ended with any questions I had for her. I asked about her team,tech-stack and her post at Google as she didn't tell at beginning. Interview ended up with a thank you note.

 

I just had one more last round before making it to the hiring team.

 

I really had high hopes. But recieved an rejection mail. Was kinda dissappointed. I am losing my confidence now but anyway it was a long shot. People work for years to get a call from google. I consider making up to that far as my achievement.

 

Don't want to speak about it as it is dishearting to everyone. Rejections are difficult to digest but we all should take it in a positive way and work more harder.

 

LASTLY I WISH VERY BEST TO EVERYONE IN THEIR SEARCH!

by Expert (107,550 points)
0 like 0 dislike

Google | June 2021

Status: 11 YoE, Principal Engineer

 

This is just to give back to the community as I have enjoyed reading the interview experiences from others who have done the same.

 

Application Contacted via Linkedin

 

Preparation: 2 weeks. Mostly looking through medium and hard LC questions. Did some practice for some of the questions as they were interesting. I consider myself having strong base in atleast the basic algorithms and datastructures as I use them and also have prepared myself for past interviews (1.5 years before).

 

I don't like spending too much time on LC type questions TBH. I would rather learn something new or build something. I did this just because it is a Google interview and I really wanted to experience it regardless of the outcome.

 

I will not be posting the questions asked because of the NDA.

 

Rounds

 

  1. Talk to recruitor - Recruitor called me to setup a date for interview. Walked me through the preparation stuff and all. Nice and helpful person. All interviews were scheduled back to back. You do have an option to reschedule it.
  2. 1st coding round - A graph based question. Coded up the warm up question but was too slow for the second difficult question.
  3. 2nd coding round - A matrix based question. Coded it and found some edge cases and probbaly missed 1 another edge case.
  4. 3rd round googliness - It involved everything. Talking about past experience and challenges. Was given a system design question but not in too much detail. Team handling and what you would do in some situations etc. I enjoyed it.
  5. 4th round coding - A query based question. Coded it but it was not the most optimum solution.
  6. 5th round System Design - Networking related | filtering design. Went good, but I may have gone into too much detail at some point and did not communicate clearly or may have been too brief for some important points. Did not time well but it was a good time.

 

All in all, the feedback was:

 

  1. Good understanding of algorithms and DS.
  2. Slow coding. Because I had to think how the algorithm would work. This is probably because I did not practice a lot. Generally I like thinking while coding.
  3. Not "perfect" code. Made some mistakes.
  4. Good understanding of systems designing, but missed to communicate few important points well.

 

Leaning towards L4, so not going ahead with it.

 

From my point of view:

 

  1. For senior position, you have to write almost perfect code and code it fast. You need to practice similar questions a lot or rote learn to do it faster. My preference as I have mentioned before is to not spend too much time for it.
  2. Interviews were spread out to multiple days. It was very stressful for me. Should have helped if all rounds were scheduled 1 month apart ;)
  3. All interviewers and recruiter were very nice.
  4. Did not find the questions too hard to solve.
  5. Google is probably not for me. I can probably re-interview after 6 or 12 months but I may not. I wish I could get to work at their scale as those problems interest me, but I will have to look somewhere else in future.

 

If Google is where you want to be, grind LC and also really understand your programming language well. Pace your system design question well.

by Expert (107,550 points)
0 like 0 dislike

Google STEP Interview Experience(Intern)
I was in my third semester when got short listed for google step interview, it was a great interview experience. It was a two session interview with a gap of 5 minutes on google meet.
For first few minutes, the interviewer tried to kickout all the nervousness in me, after I got comfortable he started with his questioning. One question was asked per session and I need to complete it in 45 minutes.
The first question asked was of recursive dp, interviewer first asked me to tellhim the approach, if it seems correct to him, he will ask to proceed further. On my way to writing the code, he asked me about each step I code. I completed it easily in approx 30 minutes.
My next question was of scalability unfortunately very new to me, it also included strings and how wisely you choose the data structures and handle data efficiently. Interviewer was helpful for me to proceed further with my code.
Atlast I want to say it was of great learning experience and glad to have it as my first interview.

by Expert (107,550 points)
0 like 0 dislike

Google | L4 | Rejected

 March 11, 2020

YoE : 8
Time taken in prep: 3 months
Leetcode problems: 127

 

I have just botched a google onsite interview and I wanted to share why that happened and what I could've done better.

 

Tips

 

  1. Arrive early, I arrived late and it cost me about 10 valuable mins
  2. Find the quickest solution you can and START WRITING CODE! I took a lot of time trying to understand and optimise the problem on the boad before actually writing any code
  3. Problems are going to be purposely vague and seemingly hard, although with a bit of thought they could have a simple solution
  4. Ask if there will be a follow up, you can and you should
  5. Be quick I cannot stress this one enough, practice writing correct and bugless code as quickly as you can. To do that you either solve problems you have already solved or solve very easy ones, you are not learning an algorithm or how to solve a problem, you are merely learning how to write bugless and efficient code fast regardless of the problem, which is a different muscle entirely! (I am working on that one now as I lacked it massively and it cost me this interview).
  6. Hate to say this but you have to know basic algorithms and how to implement by heart! you need to know how to write them if you were blind folded, this is a HUGE time saver. (recursions, DFS, BFS, quick and merge sort, ...etc).
  7. Understand DP, I solved that one pretty quickly but because I lacked fast typing I couldn't write it in time

 

Questions
I can't remember all the questions as I didn't take notes, but here is what I can recall:

 

Questions 1
You are given an infinite number of dice and you want to represent numbers with them. A represented number is lining up dice faces to make up the number, so 11 is 2 dies of faces 1 and 1, 15 is one '1' facing die and one '5' facing die . A number can only be represented fully or be a sum of fully represented numbers.for example:
* 66 can be represented fully
* 82 cannot as we don't have a die face for '8' so we have to find a number that sums to 82 and is made up of representable number, so 82 can be 66 + 16 and that would be the correct representation

 

Given any number, you need to find the optimal way to represent it with the smalles number of representable numbers

 

Question 2
You need to find the path with the largest sum in a matrix, but you cannot go back or diagonally, also there are barriers of 0s along the way, the matrix also has no cycles, so you cannot go back to a number from another number
Example:

 

[1,2,3,4,5]
[0,2,0,0,9]
[1,6,7,0,0]
[0,8,0,0,10]

 

A DP problem

 

Question 3
I cannot remember the exact question but was similar to guess the word with different variables and we are looking for a set of numbers in a big range

 

Aced the SDI and the googlyness of course.

by Expert (107,550 points)
0 like 0 dislike

Google| Software | Onsite

February 10, 2022

I am not writing the exact questions (NDA prohibits that?)
I had two onsites.

 

Google L5

 

  1. algorithms1 : A graph algorithm question. The question was not hard. But it took me a while to understand it. I wrote the code and he asked for an improvement. When I was writing the code, he said it was enough. It seemed like we connected.
  2. algorithms2: I think this one was a leetcode type question (may not be exact). I had three solutions in mind. I was writing an optimized version, then switched to a more brute force. Then i was asked to do an optimized version. I was not totally done. It was an okay effort for me.
  3. Behavioral: Google behavioral interview goes well with me. I like what they define as googlyness and it was great.
  4. System design: I never had this type of system design. The interviewer asked a hard question and I did not follow the process of requirement-api design-blocks etc. and I did pretty bad.
  5. Algorithm3: I was asked a medium(may be a touch higher) question. I wrote the solution right away. The interviewer asked about a Trie solution. I wrote that as well. Then he asked me some optimization questions and I had no answer. I was disappointed on myself, but he was encouraging me.

 

Feedback: System design was pretty bad. Recruiter managed an L4 offer approval for me. I have not had much luck on the matching.

 

Followup: Recruiter asked me to do two additional interviews
6) Algorithm4: Not a hard question. The interviewer took an effort to make me understand the question. It was with c++ upper_bound lower_bound and I forgot the corner case checks. I struggled with cases where upper_bound or lower_bound does not exist (I forgot what happens to the iterator at that point). Should have abstracted it out. I surely missed one or two corner cases.
7) Algorithm5: It was a not-so-hard question. I did well. Interviewer was very helpful.

 

Not sure whether this will help me to find matches.

by Expert (107,550 points)
0 like 0 dislike

Google L4 - Rejected

September 27, 2021

A game of timing

Beginnings

  • I had applied to Google once 3 years ago and got rejected that time in the telephonic round because I couldn't implement the 2048 game's state change algorithm.
    • At that time, did not know about leetcode, was fresh out of college and could be easily described as a dumb egotistical ignorant idiot with just a little bit of brains. Actually 4 years on, I think that description is still valid :).
  • My process started in Jul-21.
  • Recruiter reached out over Linkedin.
  • We agreed to do the telephonic rounds in Aug-21 first week.
  • Took up the leet code subscription this time as I really really lack practice :| .

Telephonic round

  • Interviewer started with a question from my resume.
    • Answered that to his satisfaction in 5 mins.
  • Implementation of finding connected components in a Graph.
    • Implemented in 15 mins, 5 mins spent in complexity discussion, worse case analysis (I got confused here and interviewer had to hint the worst case ).
  • Then a situation based problem, which required the above implementation as a sub-routine. Had to do some preprocessing on the Graph which was O(n^2) so interviewer wanted to optimize that,
    • Couldn't fully get the answer to this one just gave the first guess that came to mind.

 

Result : Passed and on to Onsite rounds.

 

Onsites

 

Given my lack of practice, I asked onsites to be scheduled after 4 weeks in Aug-1st Week. Onsites happended virtually over 2 days (2 rounds of 45 mins each day).

 

Round 1

  • Another question on Graphs. This one required BFS.
  • Implemented in 25 mins, complexity discussion took another 10, again got confused with the worse case :I-really-should-practice-a-lot-more-sigh:
  • Then a complication in the question, required to remove the tracking of visited vertices and cleverly handling edge cases to avoid infinite loop.
    • Modified the code but missed to handle the edge cases correctly and ran out of time (:so-much-lack-of-practice-sigh: ). But verbally explained during the dry-run that this code has this issue.

Round 2

  • Yet another question on Graphs, question was similar to Most-stones-removed-with-same-row-or-column
  • Had solved this during my practice, but the way the question was given took me 15 mins to figure out how to do it in O(n).
  • Again worse case analysis got me confused ::I-really-need-to-practice-a-lot-sigh:. Wasted 10 mins and didn't arrive at the answer until interviewer hinted.
  • Implementation took another 15 mins.
  • With only 5 mins remaining interviewer asked a variation of Insert-Delete-GetRandom-O1
  • Had practices the above, but the variation asked was tricky to think through (:as-you-know-by-now-I-lack-practice-sigh:), so gave the simplest solution coming to mind.
  • Immediately, interviewer gave me a case which failed my solution (:man-this-guy-is-good:).
  • Interviewer knew 5 mins were up so he added another 5 just to see if I could correct it, but I didn;t get much far.

Round 3

  • Yet another question on Graphs
    • This one required topological sort on a DAG.
      • Interviewer did not give any starting function signature, so I assumed the data-type to be a Graph of strings and explained that it could be wrapped into a model if needed.
      • Implemented in 25 mins , dry-ran, and complexity analysis all done in another 5.
  • For the follow up, interviewer asked how to detect a cycle in the Graph by modifying the implementation above.
    • Used extra memory to solve it.
  • Interviewer was satisfied and we still had 2 mins so I asked him a few questions and we ended on time.

Round 4

 

This was Leadership and Googlyness round, a lot of situational questions / past project experiences nothing on Algo and DS. We finished on time.

 

The waiting game and its consequences

  • I had heard Google takes a while to come back with results. In my case the Onsite results came back 4 weeks later (1 Week of Sep ).
  • My packet went forward till HC but they rejected it for L4 with the explanation that I lacked quick-solutioning / coming up with the most optimal solution on my own.
  • They recommended L3, with an additional round to test something else.
  • But here's the catch, being the idiot that I am, I stopped practising completely after Round 3. So for a month I was just sitting around letting all my practice wash away and filling my brain with utter garbage in exchange.
    • On top of that, never even bothered to email the recruiter early on.
      • I sent the followup email in the 3rd Week of Aug and got the reply in the 4th Week.
  • I was dumb enough to commit to the additional round 2 weeks later and started cramming up again.
    • This time I did not even prepare well, just kept practising medium problems with a timer about 2 hrs a day, even wasted a few days in dejection and festivals.

Round 5

  • Question on Trees and Strings.
    • First interviewer asked to design the Tree Node to contain the information relevant to the problem.
      • Completed in 10mins. :I-wish-I-wasn't-so-nervous-to-go-so-slow:
    • Then the actual question to handle the deletion of data in the tree.
      • Being recursive, I thought I would straightaway dive into implementation, but interviewer suggested to try outlining the cases first.
      • As usual, lack of practice + nervousness = I took about 15 mins outlining cases.
      • Finally, started to implement, and wrote absolutely garbage recursion in 15 mins. First dry run and I knew this round was gone.
      • Tried to fix a few small things in the next 10 mins ( was again given a 5 mins grace ) but realized 15 mins after the interview was over that I was easily missing 4 cases still.

Epilouge

 

All's well that ends well.
As expected, in my case, it did not end well :D . Got the call from the recruiter a week later ( :today-the-day-I-am-writing-this: ) and got to know that the HC resulted in the no-hire decision.

 

I am not disheartened. In fact, I am surprised I made it this far. By my own judgement, I should have been rejected a long time ago. Also, I stopped preparing and hastily interviewed and practically wanted to be over with it by the end of the process, so I think I deserved to be rejected.

 

I will try again next year. Recruiter was kind enough to let me know to reach out when I am ready.

 

This time I will be ready. That's my promise to myself.

by Expert (107,550 points)
0 like 0 dislike

Google L4 Offer

May 12, 2021

Hey All,

 

I have received offer from Google for L4. It took 4+months to reach at this position from first recruiter call.

 

Telephonic Round ->

 

LC medium Consecutive number in a sorted array problem with some constraint. 
HashMap solution.

 

Got the feedback after 2 weeks and moved to onsite.

 

Interview 1 -> Tree Problem more in line with Segment Tree (Coded optimal solution in time. Didn't have enough time for follow up question)

 

Interview2 -> Dynamic Programming (This round went really well. Optimal solution + coded follow up question as well)

 

Interview3 -> Grid Question + DFS + (backtracking) (Same as Interview 1, coded optimal soulution in time, but ran out of time for follow up question)

 

Interview4 -> A very weird question which took lot of time to understood the question and once i started exploring it thorugh example, the solution boiled down to Binary Search. I think the question was made very vague and ambiguous intentionally. One key learning from this is - Keep asking clarifying question untill things are very clear. Coded the solution and discussed the solution for follow up question as well. Couldn't get time for coding follow up.

 

Googlyness -> Drilled down on my project and behavioural question.

 

Currently SDE 2 (Amazon)

 

Had team fit call with 2 teams, I finally selected the second team as it was more in line with work I have done so far.

 

HC approved the packet for L4 and got offer letter. Not very happy with the compensation, I'm waiting for my Uber interview feedback. Feeling positive there as well.

by Expert (107,550 points)
0 like 0 dislike

April 13, 2021

Status: Employed (3 Months Experience)
Position: L3 At Google(New Grad)
Date: April 2021

 

Tech Interview 1: Was asked an easy/medium string question. Wrote the pseudo code, however took a long time to convert the pseudo code into bugless working code(but got it done at the end with support for edge cases). Interviewer seemed happy that I got support for the edge cases, however I took a long time.
My rating 3.5-4/5. Analyzed time complexity wrong on the first attempt
Tech Interview 2: 2 Very Easy Questions followed by 2 more complicated(involving trees, and dfs) follow ups that I had to briefly pseudocode. Interviewer seemed happy with my pseudo-code and was more focused on my communication.
My rating: 4-4.5/5
Tech Interview 3: String question again(started off easy), followed by 2 follow ups. I wasn't even sure if my code was right but I presume it was because the interviewer decided to immediately go to the next follow up.
My rating: 3-3.5/5
Tech Interview 4: Graph Question with lots of ambiguity. Solved at the very end. I was very close at the end but the interviewer gave me one small hint and I finished it.
My rating: 4-4.5/5

 

Behavioral: Basic behavioral questions
My rating: 4-4.5/5

 

What I realized: I think the case with Google is that they focus a lot on communication(fortunately one of my strong points), and the questions are very ambigious.

 

Hoping I move forward!

 

Note: None of the questions were off Leetcode

by Expert (107,550 points)
0 like 0 dislike
Current : L60 - Microsoft
YOE : 2
Interview : L3, Google India.

 

Leetcode : Around 500 (100 easy, 340 medium, 60 hard) including premium in 6 weeks, used to do CP in college days, so a bit easy to pickup.

 

Won't be able to share exact questions but will try to give a fair idea.
Difficulty level : Overall Leetcode Hard.
Phone Screen : Medium BFS / DFS question.
Onsite1 : Variation of LIS, initial questions was solved using DeQueue & Binary Search, solved the follow up with DP. : HARD Difficulty. Round went really well.
Onsite2 : Reverse of Coin Change, Difficulty: Hard. Solved the initial part using DP in O(N^2LogN), interviewer wanted O(N^2), couldn't do. I think round went well, since the question was really tricky, but I think it wasn't good enough for interviewer.
Onsite 3: DP with 2 pointer. Intially I thought it was medium, did the initial question within 15 minutes. Followup was really hard, modified question to take input as K, it became really tough, provided 3D dp approavh now. Difficulty : Higher band Hard. I think I did well.

 

Result : Received a call next day, rejected. 2 stong hires, 1 no hire. They asked me to improve on my Speed and DSA skills. I wrote 2 solutions in each round that too bug free. Not sure what are they expecting.

 

Will try again after 1 year for L4.
Advice to anyone appearing G interview : Prepare hard guys, you won't get selected just because they are hiring, need to prepare hard.
by Expert (107,550 points)
0 like 0 dislike

Recruiter contacted me in december 2021. I asked them 1 month for preparation. There were in total 5 rounds.
Screening round
Question is not present on leetcode. It was an easy level question and then a follow up question which I believe was medium (hard level medium). It invovled creating anagrams of string, so basically a string manipulation question.
1st Onsite
Questions were variation of
https://leetcode.com/problems/find-duplicate-subtrees/
https://leetcode.com/problems/maximal-rectangle/
2nd Onsite
1st question involved a simple travesal in binary tree and then some simple calculation. I would term it under easy and then a follow up for the same question in n-ary tree
2nd question was a variation of https://leetcode.com/problems/maximum-profit-in-job-scheduling/
and this was hard
3rd onsite
It was totally based on graphs. BFS algo had to applied in a 2d coordinate plane between points. 1st question had a follow up. I would rate both questions to be medium
4rth googlyness
Standard googlyness questions

 

Please add questions in the comments, I would love to answer them. I had used leetcode premium subscription and yes it did helped me (sort of). My result is not out yet although I have got positive feedback in every round with few negative comments.
I would like to answer 1 question that has been generally asked by people
How do you find time to prepare in the middle of your job because it cosumes most of the day.
I mean its something that I have seen like a pattern in my friends who all have cracked tier 1 companies and there are obviously other ways too but this something I would like to share-
If you start your prepartion today, then in 3-4 months you will be able to crack a good mid level company where after joining dependency on you is going to take atleast 6 months. So it basically means you will have enough time to prepare here (don't forget the notice period time also). I know its not being loyal to the company you have joined but this is something that has worked for many people.

 

Preparation Strategy:
First thing first, you need to have a healthy mind and body, then only you feel satisfied with your self otherwise your mind wont be able to sit and show consistency. Eat healthy food and do exercise to take care of this department.
Also share your life with few people coz humans are social animal, you can't live alone!
If you believe both of the above things are satisfied, then I believe you can concentrate very well.
I went through :
https://techiedelight.quora.com/500-Data-Structures-and-Algorithms-interview-questions-and-their-solutions
https://leetcode.com/discuss/interview-question/971009/List-of-2020-interview-question-for-Google
https://www.codechef.com/certification/data-structures-and-algorithms/prepare
Try to cover as many different pattern of questions as you can, if you get unlucky you can even be asked questions related to geometry or segment trees! Obviously there were other sources as well but this is quite good amount
I tried to complete as many google tagged questions as I could. I used to sort questions by frequency and do questions that had bar color of green and yellow. Maintain a notebook to note down question which you are not able to do on your own and try them again after 2-3 weeks.
Coding cleanly and in speed are also important. Write modular code otherwise that would be negatve comment for you! I would recommend to try written practise 10 days before the interview so that you have a good hands-on.

by Expert (107,550 points)
0 like 0 dislike

June 21, 2019 

Google | Front End engineer

  1. Take 2 strings return index of char where is not the same.
  2. Design jsbin.
  3. Given a function return a function that executed original function 1 second later.
  4. Given a timeline write the JavaScript to select all nodes within selection of timeline.
  5. Given a 2 dimensional array add the diagonals.
  6. How would you create google analytics script.
by Expert (107,550 points)
0 like 0 dislike

Google L6 2021

 May 15, 2021

Phone screening 1 :
Given a chess board an a knight and a starting position return true if Knight can visit all cell

 

  • a backtracking algorithm took 15-20 min to code

 

Followup 1 : How will you change the algorithm if a knight can only visit a cell once.

 

  • changed the code to keep the visited 2D array .

 

Followup 2 : What if some cells are marked blocked. Return true if all remaining cells can be visited.

 

Followup 3 : Return the minimum path to visit all all cell just once.

 

  • Backtracking but I did with BFS and returned the first solution.

 

Onsite

 

1 Coding  : https://leetcode.com/problems/remove-invalid-parentheses/

 

  • First asked to remove invalid brackets and return a solution with maximum length.
  • Followup : can we generate all the possible longest valid parentheses string

 

2 Coding : very similar to https://leetcode.com/problems/logger-rate-limiter/
 - Asked to design a class that will not print the log (an integer) if found in last x sec
 - Interviewer was looking for a good data structure that can print and store it in buffer
 - I did TreeMap but could have just used StringBuffer . I asked should we discard the most recent visited or already added in stream in x sec window - its up to me to decide.

 

3 : System Design -  Ads click optimization . Design a system that can be trained and evaluated to optimize on revenue as objective function. Drilled down on how will you evaluate the model on frequent basis.

 

  • Training objective function :  Imaging coke pays 0.1$ for ad click vs pepsi 0.001$ the optimization will be on total revenue and its possible model will prefer pepsi over coke as it drives heavy traffic.
    Interviewer asked
  • Evaluation sets
  • Data Handling
  • Talk about Read Write and Update scenario
  • Why choose one technology over other
  • Testability

 

4 System Design : Google Event booking system
System will work as part of Google Search

 

  • Able to list different cities in search
  • Filter by city
  • shows and event availability
  • The user should be able to choose a show at a particular cinema and book their tickets.
  • Users should be able to put a hold on the seats for x minutes
  • The user should be able to wait if there is a chance that the seats might become available, e.g., when holds by other users expire.
  • fair, first come . User can hold only upto 10 seats at a time

 

5 Googlenes / Behavior Round

 

  • biggest technical challenge
  • time when you failed
  • had a conflict
  • able to influence
  • cross-team impact situation
by Expert (107,550 points)
0 like 0 dislike

December 27, 2021

Recieved an offer within the last 6 months, I decided to post to LC as I found it very useful for prep.

 

YOE: 2 no well known companies

 

Come from a country where LC interview style questions aren't really a thing so It took a bit of time to ramp up however I did go to university and learn't DS/Algos from classes, decided to read/go through a couple interview prep books (IDK if im allowed to mention them but im sure you will find them) I found the book that starts with elements... and cracking... really useful and would reccomend (Questions weren't in there but topics are useful).

 

Spent around 2-3 months prepping, didn't interview with any other companies and I did around ~250 LC questions all up in LC mostly medium's with ~30 hards. I focused on a per subject basis untill I was confident in the subject then moved on to the next subject for the first ~180 questions then I focused on the google premium tab (Questions weren't in there but good all round practice).

 

I got interviewed from mostly american interviewers, Interviews weren't as hard as others have mentioned (maybe luck?) would reccomend looking into BST's, Tries, string questions, typical graph problems, ensure you learn your DS/Algo fundamentals. They really emphasize on communication and thinking outloud so make sure you can talk out loud and clearly communicate, and treat it like you're solving the problem with a co-worker (I know it can be hard). Also give time complexitys/Space complexitys before you code your problem and ensure that the interviewer is fine with your solution before you code it, dont just jump straight into it.

 

I went into HC with 5 Hires/Strong hires for onsite I believe from the feedback I was given. Won't provide question info because I think the questions were really fair and dont want them to be banned but difficulty would probably be medium's for the first phase then rolled into hard follow ups.

 

The biggest advce I'd give is to have fun and try your best, if not google then you will go to another great company.

by Expert (107,550 points)
0 like 0 dislike

February 28, 2022

I recently did an onsite with Google for an L3/L4 position.

https://leetcode.com/problems/paint-fence/

The questions I got from Google was very similar to this question. Thought I should give back to the community.

by Expert (107,550 points)
0 like 0 dislike
March 13, 2021
I interviewed with google starting last year in december.

Went through the Prelim round, the interviewer asked a medium problem that asked for Topological sorting. Coded the solution in 5 minutes and spent 15 minuites taking interviewer through the different test cases using the solution. After he was satified he gave me what if, I found the hint to be an improvement, not in terms of run-time but just simpler code. I made the improvements and he was satisfied.

Onsite:
1.) This round stated with a problem that asked for depth first search, i coded the solution and he added on the problem, for which i modified the approach to cover. He asked me for runtime complexity. I realised the runtime complexity was bad. he asked me for some what if, and i did the changes, they made the code readable but did nothing for runtime. Note: After the interview i thought of a perfect solution that could have improved the runtime complexity a lot, but it didn't come to me during the interview.
2.) In this round i was given a problem that required DFS or BFS, but i found that these solutions will less optimum so i went with Union find. Coded Union-Find and explained the algorithm to the interviewer.
3.) This problem too required DFS/BFS, but i applied Union-find to it, improving the runtime from DFS/BFS, this round went like a dream.
4.) System design problem, discussed capacity estimate, domain design, service design, cache and database sharding. Used the capacity estimate to answer some quatitative questions asked later.
5.) goolyness - Spoke from heart, and itterated real stories from my previous experiance.

Got the offer. I think the most important thing for me was time managment, i talked while i coded, explained away as i was writing the code. I wanted to give the most optimal solution, so i went with them, i discussed why the optimal solution is better then the other. After finishing would take one of the test cases and go through the code with that test case - line by line, to talk the interviewer through the solution again and check for any mistakes and corner cases.

I think the key was time managment.
by Expert (107,550 points)
0 like 0 dislike

Google | SWE STEP | Internship | 11 February 2022

Google India had released the applications for SWE Summer STEP Intern 2022 in November. There was a resume screening round initially. Once my resume was shortlisted, I received the mail for my interviews. Those who had applied through referral had to go through another telephonic screening round. I didn’t have that. I had 2 rounds of interviews and they were eliminatory. Meaning if we didn’t perform well in the first interview, we wouldn’t get a chance to take the second interview. Both my interviews were scheduled on the same day i.e. 11th February. We were asked to keep the questions confidential so I will not be giving out the questions. However, I will talk about the topics of my questions.

Interview 1: I had my first interview at around 10 am. I was given a shared editor similar to Google Docs. I was super nervous as this was my first interview. The interview began with a brief exchange of introductions and then I was given the question. It was a question using maps. I took a while to understand the question and then I took a moment to think of the approach. I couldn’t come up with the approach immediately but I was continuously communicating with what was going on in my mind. The interviewer corrected a mistake in my thought process and then I was back on the right track. I coded a recursive approach and she was satisfied with my approach. Then she gave a follow to of the same question. I couldn’t think of the optimized approach right at the first go so I coded an O(n ^ 3) approach. She said my approach was correct but it needs to be optimized. By now we were almost at the end of the 45 min time slot for the interview. I told them the optimized approach which she said was correct but I didn’t have time to code it. The interview ended with a discussion on time complexities. I also asked her a few questions about Google as a company. Overall it was a pretty good interview. I would say both the questions were of medium level. The interviewer kept helping me out whenever I was stuck and she kept giving hints whenever I needed them.

 

Interview 2: My second interview was scheduled for the afternoon. We again started an exchange of introductions. Then the interviewer typed out the question in the shared editor. The question was on arrays and was an easy one. I made a mistake here and I started thinking immediately about the optimized approach. I started coding it as well but halfway through it, I realized that I was making a mistake. I then started coding the brute force approach. After I was done, the interviewer asked me to optimize it. I thought for a bit and with one hint from him, I optimized my code. Then the interviewer gave me a follow-up to the same question. I thought about it for quite some time but felt completely stuck. However, I kept telling the interviewer what I was thinking. He told me that I was thinking in the right direction so I tried to code what I was thinking. I reached the optimal solution eventually. We discussed a bit about the time complexity of my code and he also asked me about the range on INT_MAX and INT_MIN. After this, I asked him a few questions about Google and then I was done with my interview.

 

Results: Both my interviews went well but I wasn’t sure if I would get the offer or not. After a long wait of 17 days, I finally got a mail that I had received the Google SWE STEP Internship Offer. 

by Expert (4,460 points)
0 like 0 dislike

Google | SDE-1 | (Off-Campus) | 23 Feb 2022

  • Difficulty Level : Hard

 

Round 1 – Resume shortlisting

 

Round 2 – Recruiter call (15-20 mins phone conversation)

 

Round 3 – Phone interview (45 mins technical interview conducted on meet)

 

Question asked: https://leetcode.com/problems/time-needed-to-inform-all-employees/

A variation of this question was asked as the head node wasn’t given that is it wasn’t certain to which manager CEO will give the message and my task was to first find out which node should be the starting point and then find the total time taken to reach all employees. 

Also, input was not a simple integer it was a structure containing name, employee id, and an array of employees reporting to that employee. I went ahead with graphs for solving this question, first ran a DFS to find out the head node that is the employee to which if the CEO gives the message it reaches all employees and then ran a BFS to find out the total time taken for the message to reach all employees.

 

Round 4 – Onsite Interview (Conducted on meet – 15 mins GNL round, 45 mins technical)

 

GNL round – Googliness and Leadership round where behavior-based questions are asked to check if the candidate is the right fit for Google culture.

 

Questions asked:

  • How many binary numbers of length n are possible?

For ex. n=2, binary numbers possible are – 00,01,10,11 similarly for any length n total number of possibilities will be 2^n

 

Round 5 (Onsite interview) 

Conducted on meet – 15 mins GNL round, 45 mins technical

Question asked – Given input equations, output true or false

For ex. {a>b, b>c ,c>d, d>a} is this input true or false?

Here the input is contradicting so the output will be false. My approach was considering all variables as nodes of the graph and then drawing an edge from vertex u to v if u>v and output will be false if a cycle is present in the graph.

Topological sort of DFS can be used to detect cycles in directed graphs.

 

Round 6 (Onsite interview):

Conducted on Meet – 15 mins GNL round 45 mins technical

Questions asked

  • Given an input string s of characters, return index where s[i] < s[i-1]
For ex. - "De-Hi&yaR2"
Output - 7  

Explanation: Hyphen, ampersand and other characters which are not alphabets don’t have to be considered for alphabetical order of string and capital or small letters don’t matter as e>d and also e>D so my approach while solving the question was to convert all letters to smaller case and then compare them and ignore other characters if encountered.

  • An array is given where arr[i] holds the frequency of number present in arr[i+1] and we are supposed to implement next() and hasNext() method such that until the frequency of all numbers is 0 hasNext() returns true and next() returns the first number while traversing array which has non zero frequency.

For ex. [0,5,1,2,3,0,5,2]

Output – If next() is called it will return 2 as the frequency of 2 is 1 and the value before it which was 5 has frequency 0 so that’s not returned, now the frequency of 2 will become 0 as the next() pops the value out.

Now when next() is called again it will output 0 as the frequency of 0 is 3 and now it will become 2. The next() can be called multiple times so on till hasNext() doesn’t return false.

by Expert (4,460 points)
0 like 0 dislike

Google | L3 New Grad | Hyderabad, Bangalore | Feb 2022

 

Status: 2022 grad, Tier-3 college
Position: Software Engineer, 2022 Start
 

Phone Screening Round (45 mins): DSA

 

Interview started with a small introduction and the interviewer sraight away jumped to the problems.

 

1. String Replacements
Here is the link to the problem: https://leetcode.com/problems/find-and-replace-in-string/

 

Class Replacement{
	int start;
	string before;
	string after;
}

 

start: start index
before: substring that is present at the star index
after: Replace the before substring with after substring.

 

Given a string and replacement queries. Return a string after performing all the replacements.
Ex:
Input: num foo;
replacements: [
{start: 0, before: "num", after: "number"},
{start: 4, before: "foo", after: "bar"}
]

 

Output: "number bar;"

 

MyApproach:
I discussed different approached with the interviewer. Finally, I told the concantenation approach.
For every replacement query, we do
string ans = s.subtr(0, start) + after + s.substr(start+before.size());
swap(ans,s);

 

And finally return s. For this to work our queries need to be sorted in decreasing order of start index.
The interviewer was satisfied.

 

2. Cards

 

A card has 4 attributes (shape, size, color, shading). You have been given 3 such cards. A set of three cards is said to be valid if for each attribute either
a. All 3 cards have same value
b. All 3 cards have different value.
Write a funtions valid_set() that takes in a set of cards and returns if the set is valid.

 

Ex:
Input:
[
{1,1,2,3},
{1,2,2,3},
{1,3,2,3}
]

Output: True
Explanation:
Each card is represented as row and each attribute is represented as column. 
For the first attribute (0th column), all cards have same value. 
For second attribute(1st column), all attributes have different value. 
For third attribute (2nd column), all attributes have same value. 
For 4th attribute(3rd column), all attributes have same value.
For all the attributes, all cards either have same value or different value. So this set is valid.

 

As number of cards is 3 and number of attributes is 4, constant space and time solution was expected.

 

My Approach:
We cam simply take the input as a 3x4 matrix and traverse the matrix in column major format. We can use if-else statements to check the condition or we can also use set.

 

3. Cards Follow up
Given n number of cards, return 3 valid cards set if they exists. (Validity rules expained above)

 

As number of cards given is N, I was able to come up with a O(N*N) time and O(N) space solution. Please let me know if you come up with a better solution.

 

My Approach:
First I told the brute force approach with O(NNN) TC.
For optimizing it further, we can use two for loops for iterating over ever pair of card.
Using those two cards, try to construct the third card and check if it is present in the given arr.
We can use unordered_set to optimize the search.

 

Onsite Round- 1 (45 mins): DSA

 

The interviewer jumped directly to the problems without any introduction or any greetings.

 

1. Longest Arithmatic Sequence
Given a root of a binary tree and an integer, you need to find the length of the largest arithmatic sequence of nodes in the tree.
Constrain: Each subsequent node in the sequence should belong to a lower level that the previous node.

 

Note that the longest sequence need not start from root.
I discussed the approach and gave a correct solution. Interviewer as satisfied and he asked me to code it. I made some minor mistakes while coding.

 

2. Longest Arithmatic Sequence Follow up
After coding the solutions for previous problem, interviewer asked me what would be the solution if the constrain is removed.

 

Discussed the approach and he asked me to code it. Finished the code very close to the end time.

 

Onsite Round- 2 (60 mins): DSA + Googlyness

 

The interviewer seemed really off, dont know why. He gave his introduction very grumpily and asked me to give my introduction. Then he jumped into the coding question.

 

1. Find unpainted segments
Given a series of segments of length 1. Initially all of the segments are unpainted. Given queries of the form [left, right], return the number of unpainted segments in the range and then paint all the segments in that range.

 

I gave the brute force solution. Interviewer asked me to optimize it. I discussed a Segment Tree approach. he want convinced and kept telling me something is wrong. He seemed frustracted. Finally, as the time was running out, he asked me to code it. I could only write the segment tree code in the time.

 

2. Googlyness Round
a. Tell me about a situation when you went above and beyond od what was expected of you?
b. What would you do when you have to ship a feature tomorrow and it starts failing for certain group of users the day before?

 

Result / Feedback : Awaited......

Overall Experience:

 

I have read many interview experiences saying that Google interviewers are very friendly and helpful. Well, my experience was slightly on the opposite side. None of the interviewer seemed friendly and welcoming. But its always a nice experience to interview for such a big company. The process definitely takes care of the candidate and its need. A session is scheduled before the rounds to let you know what Google expects from you. You can also reshedule the interviews is there is some emergency.

 

Tips:

 

Have a good hold on Data Structure and algorithms. I have realised that Google asks questions that fall in a sweet spot above the level of normal DSA questions and below the level of hard Competitive Programming questions. So having a bit of CP experience is always a plus.

by Expert (4,460 points)
0 like 0 dislike

Google | SDE | 21 Sep, 2021

  • Difficulty Level : Easy

A google interview consists of 1 Phone screening(15 mins), 1 Technical screening(45 mins), 4/5 onsite rounds(45 mins) mine was held 4(3 technical and 1 behavioral)

Tips for technical interviews :

  1. Make a time schedule(Time is restricted in most interviews from 45 mins to 1 hour, at Google really strict)
  2. My time was: 10 mins(intro and understand the question), 5-10 mins (discuss approach), 10 mins (write down code) 5 mins (dry run the code with example), Other time complexity and bug fixing discussion
  3. Go for brute force if you find your time is > 25 mins optimize later (always look for hints from the interviewer)
  4. Do not lose until an interview is over, You have got this.
  5. Write clean code, if you compromise always inform the interviewer. (Also do not waste time on this)
  6. Dry run with an actual case with output side by side
  7. While practicing do some competition that will help you to get the clear question because often a question comes with a story and not a very good input or output format, I used Leetcode competitions.

Round 1: Technical

  • Write a shuffle for a music player with k iteration of cooldown. Given a list of songs.

Round 2: Technical

  • given a string encoding: a1b2c2 (lower case alphabets followed with their count)= abbcc
  • Write an iterator for the same with functions next()(should return the next character) and hasnext()(should tell if the next character exists).
  • given parent-child relations. given 2 nodes find if they are genetically related(have the same parent using the data)
for e.g. given relation parent->child : a->b, c->b, d->a
isRelated(b,d) = true, isRelated(d,c) = false

Round 3 : Technical

  • For both, these question nodes are related horizontally and vertically
  • given a matrix of water(0) and land(1). return island with the maximum area
  • given matrix of water(0) and land(1). Consider Ocean(water touching surrounding edges of the matrix), lake(water surrounded by land), continent(land area): Return Area of the continent with the greatest lake. (this area should also contain the area of all inside lakes inside that continent)

This is one of the hardest questions I was able to solve. I was grateful that I practiced really well.

Round 4: Behavioral (Googlyeness)

This round is a little tricky because it seems like they assess how well did you manage your work in the past and how well you will be fit for the team. It was taken by the team manager I was going to join. They discussed quite a lot about the backend technologies I was working on and how did I contribute to my current organization.

I did quite well. I prepared for the behavior interview in advance so it was a little smooth for me. For behavior questions, I have prepared these questions beforehand that helped me greatly.

  1. How did you resolve any conflicts between your team?
  2. Tell me about one time you worked on a project/task and it failed?
  3. What is the most challenging project you have worked on?
  4. What is the project that you enjoyed most?
  5. What is your greatest strength/Weakness?
  6. What is the hardest bug that you solved?
  7. Why should we hire you?
  8. I was asked if you are tech lead and get to know that there is exactly the same project that is done in your organization how would you handle this situation?
  9. I told her I will try to merge. There is no wrong or write here, but you need to justify and clear out all the steps you are doing and the basis of what you are taking the decisions along the way. If you have exact experience tell me how did you handle that.

Also prepared well your intro I was giving multiple interviews in many startups and I curate different intros according to the roles that I am interviewing for !!

Hope this helps!! All the best!

by Expert (4,460 points)
0 like 0 dislike

Google | L4 | Bangalore | Jan2022 

Experience: 3.5years

Position: SDE2 

Location: India

 

Due to NDA I won't be sharing specific questions but surely the topics and difficulty level. If you are looking for change and Google is on the list, start with Google as the process will take 45 days even if HR says 15 days!

 

Screening round (1 hour)

  • Algorithmic Questions
  • Topics: Heap, Map
  • Difficulty: Medium

 

The question was an implementation of a prediction problem based on some data. The language was a little vague but really easy to solve! Interviewer was very helpful!

 

Round 1

Very vague questions and poor examples, I was very nervous and was unable to understand and I tried to ask questions to make sense of it but was not able too. Mistake I did, I took the last example as the base case and asked some questions and jumped to solving. It was a tree question and I don't know why I didn't created trees on the doc to ask him question I wanted to open a miro to create diagrams and show him but I was shying away. As I begin solving he realized I got it all wrong, so he quickly came up with a tree and shared his screen after that it was clicked me but I was too late!

  • Topics: BFS, DFS
  • Difficulty: Medium
  • Result: No hire (1)

 

Round 2

We chatted about my projects. He was a full stack too, so we had a nice chit chat. He seemed to be really impressed by my answer. Question was really easy but tricky (It's on leetcode premium, No promotions!)

  • Topics: Tree traversal
  • Difficulty: Medium
  • Result: Hire (3)

 

Round 3

The interviewer was from outside India and very helpful throughout the interview. Question was related to strings. I came up with a silly solution 2^n then optimized using cache(memo) top bottom DP. He was happy but then he said what if 1 string is too big? Can you optimize it somehow, I was not able to come up with anything so he gave me an example and voila it clicked me. No coding for this follow up. To be honest thank god no coding, because though I was able to come up with a solution it was really hard.

  • Topics: DP, String
  • Difficulty: Hard
  • Result: Strong Hire (4)

 

Round 4

Matrix problem (similar is on leetcode), As I knew this problem I skipped a very important point in the question so for brute force method I came up with wrong complexity but he corrected me, then I took a visited matrix (to avoid loop) but it was not needed, he asked me it is needed? It clicked, I explained why not and removed then solved the problem and follow up!

This was the deciding round for me, L4 or L3. Due to that missed point, I missed the L4 and also he forgot about the visited array removal explanation. (My HR asked me if you removed some code without any explanation on pointing, so it's a guess.)

  • Topics: DP, Matrix, DFS
  • Difficulty: Hard
  • Result: Leaning No Hire (2)

 

Round 5

Behavioral round. 

 

Team Match

Happened with one team, aligns with my work and said yes.

 

Result

Offer L3

 

Final Note

Please Do MOCK INTERVIEWS! 

by Expert (4,460 points)
0 like 0 dislike

Google | L3 | Onsite | Jan2022

 

Round 1: Googliness

Asked some scenario based questions and- Tell me about a time...

Was able to communicate well. In my opinion, I didn't use any bad examples or any bad words. Could answer nicely on scenario based questions. But in some answers communication wasn’t too good. :p

 

Round 2: [ 1 easy, 1 hard problem ]

For the first problem, provided solution too quick. 1 in (n^2), another in NlogN. Interviewer didn’t want me to code. Said it was a warmup. Then gave a harder version of that question on a matrix. Took time to find a soln. Then provided a bad soln of n^3. Then gave another n^2logN soln which was good. But only 15 mins was left. He wanted me to code. But coding was long. I coded 70% perfectly and talked while coding. Told that if we had time what I'd do. Asked if he understood everything. He understood and said there was no need to worry about another method implementation. Asked questions from the code, and suggested an improvement.

He was happy.

 

Round 3: [1 easy, 1 medium problem]

Interviewer gave me an easy problem. Gave him a quick solution quickly. Asked me to code. Coded that nicely. He asked questions about the implementation. I improved the solution and answered everything he asked. He asked if I knew how to do a part in a particular way. Also Said It's okay if I don’t remember. I coded that too.

Then he gave me another version of the problem. I coded that too. Found some bugs myself, took a little time to fix that and then fixed it. Showed how it works in different test cases. He then changed some constraints and I answered his questions and said how would I change my code for that.

One thing is- that was an nlogn solution. He didn’t ask about improving. I had O(N) soln in mind. Forgot to talk about that :p

Couldn’t answer some small questions regarding a C++ built-in function. But I still guess that was okay with the interview.

  • After the interview I found out I missed 2 corner cases on the solution. :(

 

Round 4: [ 1 Medium ]

That was my best interview. Although the interviewer's communication wasn’t so clear and he was slow. He asked me a dfs/bfs type question where dfs/bfs wasn't even needed. I first explained how to do that using dfs/bfs. Then started coding in bfs. Then found bfs is not even needed. Explained it. He was happy. Coded that nicely. Asked if he had any other questions or if I should take the test now.

Went through testing, Found out an error myself. Explained why It's happening and then fixed the code. Again tested and explained. Asked several times if he understood everything. He was clear. He asked some other questions about code. The whole thing was done in 30 mins.

I guess he was very happy.

 

Round 5: [1 medium to hard and lot's of follow up]

The last interview was pretty challenging. He gave me a medium to hard level binary search problem. The coding part was done in 25 mins.

He then talked about CPU optimization. Asked how I would use the previous code if I had M CPU's? What would be the final time complexity. I couldn’t answer that much. But he cleared his questions differently. It was similar to a system design discussion and I wasn’t prepared for SD. I think I didn't do very well on that part, but also wasn’t too bad. He Wanted to know what I'm thinking. Whole discussion lasted till 55mins.

I guess the interviewer was also happy as he answered all my questions pretty nicely. (But not sure though as the last part didn’t go well)

So, that was everything.

Conclusion:

  1. I found 2 problems same from LC
  2. Other 2 were not in LC but if someone knows DS and Algos well, he can solve it.
  3. Try learning about the library function we regularly use.

 

Result: Received offer

by Expert (4,460 points)
0 like 0 dislike

Google | On-site | New grad SWE

 January 14, 2021

Q1. Given a table of rules, write a function to check if it contains conflicting rules. Two rules are conflicting if their conditions match but values do not. Conditions can contain don't cares denoted by '-'. Has to be done in O(n) time.

 

e.g
Rule Conditions Value
R1 C1,C2,C3 40
R2 BCD1,BC5 40
R3 BCD1,BC5 80
Here, R2 and R3 conflict.
e.g
R1 C1,C2,C3 40
R2 BCD1,BC5 50
R3 BCD1,- 50
R6 -,-,C3 40
No conflicts.

 

Q2. same as Round 4: https://leetcode.com/discuss/interview-question/930843/google-l3-onsite

 

Q3. Don't remember the exact question but it boiled down to Employee Importance

 

Q4. Given an n-ary tree, a monkey starts from the top of the tree and can climb to any of its children or stay at the same position (cannot jump more than one step). Write a function to find the probability of finding the monkey at a particular node at a time 't'.

by Expert (4,460 points)
0 like 0 dislike

GOOGLE | SWE NEW GRAD | [Rejected]

February 15, 2022 

I am writing down the whole experience. As it might be useful for anyone aiming for google or any giant tech. I interviewed with them at the end of by 7th semester during undergraduation. (Currenlty I am in my 8th Semester)

 

A random evening, I recieved a call from a google recruiter. Firstly she apologied for calling up late evening. She said her team was impressed by my linkedin profile and wanted to reach out. Then she checked their database wherein I applied for an opening around 8 months back. So they got my contact details. She also said that for some candidates, they directly move to the onsite rounds rather than phone interview if the profile is impressive. And I was one of those!

 

I agree that I have a good prior project and internship experiences and have been contacted by many HRs through Linkedin. But GOOGLE was beyond by dreams. To be honest, at the first glance, I thought it was a prank call, so asked her to email me the job details for which they want to interview me. She did the same and schduled by interviews within next couple of days.

 

It was a long shot also, didn't had enough time for preparation. I tried to prepare mentally to face it though :)

 

All rounds are strictly of 45 mins. They hard stop there! Sharing all the rounds experience, won't share the exact questions as I have signed NOC.

 

Onsite ROUND -1
TECHNICAL ROUND

 

Interviewer was Senior SWE at Google. Didn't turn on his camera as he was having bandwidth issue. Started with his introduction followed by mine. Gave a question staight away. Based on doubly linked list. It was Easy to Medium level question.

 

I took some time to undersatnd it and then explained my approach. He asked about corner cases. After seemed satisfied, asked me to code it. I did it pretty fast, but then missed a corner case, he asked me to recheck, then I spotted it out.

 

Then he asked about my projects and had some discussion on prior internships. Interview ended with if I had any questions for him.

 

Onsite ROUND-2
Googlyness

 

Conducted by Senior Software Engineer at Google. Project Discussions and Behaviorial Questions to check if your values align with that of their's. Think and answer wisely.

 

Onsite ROUND-3
Technical Round

 

Interviewer was SWE at Google Cloud. She didn't introduced her nor asked for mine. She doesn't seemed friendly at all. I became a bit nervous. She jumped to DSA question. Just verbally gave a question something regarding git commits and asked my approach.

 

I tried to think and clearify the question. Then she wrote the question on the coding doc. I understood what she wanted to ask, I gave a binary search approach. She didn't interact much so I don't know if I was on right track. She said to code down whatever I explained. I did it. Then she asked me to explain my code, while I was doing, she doesn't reacted, so it was difficult for me to understand if I was able to make her understand what I wanted. She said, she got what I was doing and lets move to next question as only around 12 minutes to complete the 45 minutes session were remaining.

 

The next question was related to system streams of input. I clearified my doubts but since no sample test case was given, I was struggling to get what exactly is asked. I asked her if she can give me a sample test case. She did so. After looking at sample input I quickly thought of a dynamic programming solution. Explained it to her. She asked me to write the dp equation and complete the function as soon, because we didn't had enough time. She asked about complexity and what my dp vector does etc. The interview ended with any questions I had for her. I asked about her team,tech-stack and her post at Google as she didn't tell at beginning. Interview ended up with a thank you note.

 

I just had one more last round before making it to the hiring team.

 

I really had high hopes. But recieved an rejection mail. Was kinda dissappointed. I am losing my confidence now but anyway it was a long shot. People work for years to get a call from google. I consider making up to that far as my achievement.

 

Don't want to speak about it as it is dishearting to everyone. Rejections are difficult to digest but we all should take it in a positive way and work more harder.

 

LASTLY I WISH VERY BEST TO EVERYONE IN THEIR SEARCH!

by Expert (4,460 points)
0 like 0 dislike

Google | New Grad SWE | April 2021 | Virtual Onsite

 April 20, 2021

Status: New Grad, BS CS
YoE: <1 Year (Previous Big N internship)
Location: MTV

 

Cannot disclose specific questions due to NDA.

 

Beharioral Round: Standard behavioral questions, taked about previous experience and project. We has a good time.

 

Grade: 4/5. I could have done better communicating my past internship, but he seemed impressed.

 

Round 1: Math related question. Felt like if I knew the math ahead of time, I would have been able to code this up in 5 minutes. Instead, I spent 35 mins trying to derive the math needed and the last 10 coding when I finally got it.

 

Grade: 3/5. Interviewer was not enthusiastic. Could have practiced more math questions, it was either a "you got it or you don't" with this one.

 

Round 2: Q1: Simple string question (easy), check whether a string is good or not. Did this in 10 mins.
Q2: Determine the number of good strings of a certain length, used backtracking along with my answer to Q1 to solve this.

 

Grade: 4/5. Could have done this quicker, but got through everything. Interviewer was rolling along with the solution but was reserved at the same time.

 

Round 3: Q1: DFS related question. What made this difficult was there were so many conditions to check. Code was sloppy at first, but simplified it remembering what I learned from LC. Interviewer explained bugs to me and I quickly corrected.

 

Grade: 3.5/5. Would have been a 4 if I simplified from the get. Interviewer was enthusiatic and thought I did well in thinking out loud, which helped me relax enough to perservere through this one.

 

Round 3: Q1: easy array question (randomize placement of numbers in square array)
Q2: return an randomized array such that all numbers are grouped with each other, first I thought of graph traversal used backtracking to generate the combination (placements once again had to be random). Didn't have time to finish this one, so interviewer told me pusedocode was fine.

 

Grade: 4/5 Felt like I had the fundamentals down. Hard to talk about big-O when dealing with random stuff, so we just thought of the average case or "in expectation".

 

Thoughts: Very math and graph heavy with some recrusion mixed in, could have done more math related problems. I don't think I'm getting this job, but who knows.

by Expert (4,460 points)
0 like 0 dislike

Google | India | New Grad [Offer]

March 23, 2021

Recently had my Google India interviews for new grad role.
I received a mail from a recruiter around June 2020 asking if I'd be interested in interviewing with them. Initially was asked if I would like to go directly to the onsites in the last week of September. Declined this as I wasn't very prepared. They said if I wanted to interview later, they'd have to have a phone screen as well. I didn't mind this I just wanted to be prepared through the whole process instead of rushing into it.
Had my phone interviews in October 2020. Scheduled onsites in the first week of February 2021.
Here's how it all went -
Telephonic Rounds

 

  1. Telephonic Round I :
    It was a simple question which was overcomplicated in the language. Took me too long to understand but I ended up giving a sub-optimal solution.
    The round went okay, wasn't very sure of what to expect.
  2. Telephonic Round II :
    A second round was scheduled and this time I had 2-3 questions related to each other on arrays. Overall the round went far better than the last one and I was feeling confident about this.

 

Received positive feedback from recruiter and was moved onto the onsites.
Onsites

 

  1. Onsite I :
    Got 2 medium questions revolving around BFS and Dijikstra's. For the second question I was initially thinking DFS but my interviewer asked me to optimize the solution. Finally finished both of those questions and the codes. Had a little chat about further subtler optimizations if possible. Overall, this round went very well according to me.
  2. Onsite II :
    Got 1 hard question. Initially stated a few points but started drawing blanks in the middle so there was a gap in communication. Asked the interviewer for a hint or two and he pointed me in the right direction. It was related to topological sort and I finished coding it. I wasn't very sure of what I was doing but the interviewer seemed to be happy with my code.
  3. Onsite III :
    Probably the best round I had so far. I was asked 4 questions of easy/medium difficulty and coded all of them. The questions were related to stacks, sliding window, dp, topological sort/dfs. Felt really good after this round.

 

About half an hour later, received a call from my recruiter saying that I did very well on 2 rounds and okay in 1 round and that they were happy with my performance and wanted to schedule the remaining two rounds the very next day.

 

  1. Onsite IV :
    This was the HR/Googleyness round. A lot of situational/leadership questions were asked. I believe it went well wasn't able to make out much from the Interviewer's tone.
  2. Onsite V :
    This was the final technical round, probably the worst onsite. I was asked 1 medium question. I said we could do a dfs and my interviewer asked me to go ahead and code it but I wasn't very convinced about the optimality of the solution. So I asked him if there was a better method possible and he asked me to store states in a dp. I started coding it but I wasn't very convinced with what I was doing and somehow the dp solution wasn't working well. So I suggested a BFS + dp(basically a dijikstra) solution and coded it. He didn't fully understand my approach even after explaining it to him numerous times and since we were almost done with the time, he said he'll read the code and evaluate it after the interview. I was very confident about the accuracy of my code, but I wasn't sure as to how this interview went. Also since they expect you to solve 2 medium questions in 45 minutes, I think that maybe it didn't go very well.

 

Received a call from the recruiter 2 hours later saying that overall feedback is positive and that they'd be sending my packet to the HC for approval. Does anyone know how long it takes to hear back from here?

 

Fingers crossed!

 

Update : The recruiter reached out after 10 days saying that I needed an additional round as the HC was a bit conflicted.
Additional Virtual Onsite I :
LC medium question slightly modified. I arrived at the solution pretty quickly and spent the rest of the time in implementation. Was a bit slow in coding so I wasn't sure about this round. Lost all hope after the interview.

 

A week after, received a confirmation from the recruiter saying that HC has approved my application and they are moving on to the team matching and offer review process. She said that I was overthinking about the last round and the interview went fairly well.
Received an offer, super elated! YAYYYYY :)

by Expert (4,460 points)
0 like 0 dislike

Google | New Grad | India | Onsite [Rejected]

May 2, 2020

Date: January 2020 - March 2020

 

Phone screen 1: (Mid November 2019)
Straight forward Word ladder, but with bits instead of letters. Took a few hints and some time to answer the follow-up question, which was to also print the path. Hence, had to go through another round.

 

Phone screen 2: (End November)
Simple tree based question. Had to find a number in a tree with some special properties. Don't remember the exact details. Solved it.

 

Onsite: (End January: Long gap due to Christmas)
My onsite was in Bangalore.

 

Round 1 : Medium level DP question. Fairly straightforward and I quickly identified it as DP. Had to maximize the profit given some costs. Had around 15 minutes left and was asked World ladder again! Went very well.

 

Round 2: Had to model the given question as a tree and then find the max cost to reach any node from the root node. DFS. Follow up was to model it as a graph, for which I had to use Dijkstra. Coded the Dijkstra version. Went very well.

 

Round 3: A string problem. Had to find the shortest string which doesn't occur in the given boolean string. This was pretty interesting because I had to optimize for memory and not for time. Each followup had a stricter memory constraint and some additional requirements. I was given input and memory limitations in mega bytes. Took a few hints.

 

Round 4: Array based question related to taking snapshots of the array. Had to implement few methods. Found out later that this question was added to Leetcode recently. Took a few hints. Next, I was asked a simple tree question, no coding was required.

 

Round 5: Pretty tired at this point. Had to find a path in a maze. Started off as a Medium level question and then progressed to a Hard level question. Hard one is on LC. Just managed to give sub-optimal solution after taking hints and could not even answer the Hard question.

 

HR: (Mid February)
Apparently there was a mistake in scheduling the rounds and I still had to give the HR round. Typical HR questions.

 

At this point, I felt I had a decent chance if they considered the first 4 tech rounds. But, a month later, I got a call saying I will have 2 more virtual onsite rounds since they still had to test my problem solving skills.

 

Virtual onsite: (End March)
Apparently, I needed to take 2 more rounds to further test my problem solving skills. It had been months since I prepared and I have a terrible memory, hence had forgotten almost everything. Had just a week to prepare for this. I had no motivation at all to prepare from scratch yet again and was feeling frustrated.

 

Round 1: Given a lot of intervals, had to find the number of intervals present in a given range. This was not direct. Took some time to figure out this was what they were asking for.
It had been a very long time since I had done an interval-related problem and hence screwed this up completely. Also, the lack of a white board for this question was a huge drawback. Anyway, I managed to give an oral solution to a part of the question but couldn't code it well. The solution is to use binary search. Wasn't allowed to use libraries for searching though, which further added to the problem. Completely bombed the round.

 

Round 2: This was more of a discussion on how I would design searching and ranking of documents and optimizing it. No coding involved. Went very well.

 

Round1 of the second onsite was obviously the reason I was rejected. I felt bad that the result was kind of determined by just one weeks preparation. In total I solved around 200 LC questions. Also, the process lasted for around 6 months due to Holidays etc which was just bad luck. I burnt out mid way and got tired of Leetcode.

 

My advice:

 

  • Get premium and go through the latest questions in LC tagged with the company you are interested in. I probably would have got the offer after the first onsite itself if I had done this.
  • Practice explaining your solution on a Google doc. Especially for trees, intervals etc. I had plenty of practice coding on a Doc.

 

Anyway, the recruiters and co-ordinators were very professional and helpful at every step. It was an amazing experience overall.

 

Journey before destination.

 

by Expert (4,460 points)
0 like 0 dislike

Google | New Grad 2022 | India [OFFER]

January 25, 2022 

I recently gave Interviews for 2022 graduate Software Engineer position in Google India. I can't reveal the exact problems because it's not allowed but can share some ideas.

 

My process started in Oct 2021. There was no OA. Recruiter directly contacted me via mail.
I was asked to share-
1)Updated Resume
2)Preferred Coding Language:
3)My availability for interviews

 

After resume screening, recruiter conducted small meeting to explain the process. The process is as follows-

 

  1. Telephonic Screening (45 min technical)
  2. Two Virtual Onsite Rounds (1st Round- 45 min technical; 2nd Round- 45 min tech + 15 min GNL)
  3. Final Virtual Onsite Round (45 min tech + 15 min GNL)

 

All the above rounds were conducted on Google Meet and shared coding doc was used. It wasn't Google Docs but their internal coding doc specifically for interviews. It had no auto-completion but had slight color highlighting and proper indentation.

 

1. Telephonic Round (Oct 2021)- It was pretty much same as Onsite rounds. Just the name is different. I was asked a Geometry Problem. Told him a brute force solution first verbally because that's the first thing that came in my mind. He wanted me to optimize it. After thinking for some time, I gave him an optimized solution and he was satisfied with it. He asked me to code it. I wrote the code. He read my code and was satisfied with it. He then asked me to improve runtime (not the time complexity) if the points are uniformly and randomly generated. I gave him some ideas and he was satisfied with that. I changed my code accordingly. In the end, he asked me if I had any questions for him.

 

After 1 week, I was told that feedback for telephonic round is positive and then next 2 rounds were scheduled.

 

2. First Virtual Onsite (Nov 2021)- This round was cakewalk for me. Interviewer directly started with the first problem. It was Leetcode easy level I think. It was just basic implementation. I explained him and wrote code. He told me to dry run the code on test case given by him. While dry running, I found 1 error and fixed it. He moved onto the follow up. The input of the follow up was output of the first problem. The problem would be Leetcode med level. In fact a similar problem already exists on Leetcode. It was application of multi source bfs. I wrote the code pretty quickly. He told me to check for some errors. I checked and there were some typos. I corrected them and then he asked me if I could not extra vis array and reduce space. I did that. He looked satisfied. This interview ended in only 25 min out of given 45 min.

 

3. Second Virtual Onsite (Nov 2021)- This was the hardest round I guess. There were 2 problems and both were based on playing cards. First one was pretty easy- just simple implementation. Then he gave the follow up. I gave him brute force solution and then asked me to optimize it. I didn't have any good ideas for some time. I gave him 2-3 approaches but some of them were either wrong or not optimal. I felt a bit nervous and I didn't get any idea. He also didn't give me any hint :frowning: After that an optimal solution came in my mind and I told him. It was different from what he wanted. So, he changed the constraints of one term to make my solution exponential. He then gave me a hint. Then, I told him another solution. He was satisfied with it. But then he again changed constraints of one more term. I felt like dying. I told him the solution for final constraints. He asked me to code it. The input format was difficult to parse. So, I asked him if I could assume input as array of array of integers for simplicity. He said ok. First, I had some issues with implementation but was finally able to implement it. He asked me to check for some error. I immediately realized a logical error. I fixed it. I wrote the final complexity. Then he bombarded me with 5-6 GNL questions. Overall, this was the hardest of all and went for complete 1 hr.

 

After a little more than 2 weeks, I was told that feedback for onsites is positive and then the last round was scheduled.

 

4. Third (last) Virtual Onsite (Dec 2021)- This was a different kind of round. I had to implement 5-6 functions that took object of entity as parameter. The entity could be a file or directory with some properties. Some of the functions were pretty easy and some were medium. I was able to write codes for all functions fluently except for one. For that one, he told me to dry run code for given test case and then I understood the logical error. I fixed the error. Overall, this round was quite interactive and I quite liked it. Regarding the concepts, this round tested- oops, trees, lazy caching/dp, updating the cached values etc. Then there was 10-15 min GNL round. It went well.

 

I haven't got the final results yet. I am very nervous. What do you think guys? Will I be able to make it?

 

UPD: I did make it :)

by Expert (4,460 points)
0 like 0 dislike

Google | New Grad | Phone Screen

 February 14, 2020 

I was given about a month to prepare for technical phone screen.

 

Technical phone screen.

 

The interviewer was running late on time, and my interview started 20 minutes late. First he gave me a warm up question, and I made some mistakes on incrementing counter. About 10-15 minutes later, we proceeded to another very simple question. I gave him two approaches, and discussed their pros and cons. Then we coded one of them. Then he asked me a simple algorithmic concept in detail. After doing that, we moved to a backtracking question, which I started coding, but could not complete, as he said we are out of time. Just asked me complexity of the question.

 

I though that I messed up beause of the very simple warmup question, and not being able to code the last. Surprisingly I got a mail saying feedback was positive.

 

Preparation: Phone Screens, I believe are pretty easy. They overlook a lot of points. Just making sure that you are able to come up with something resembling a good solution. I did abut 60 LeetCode questions for phone screen, and a few questions from some other sites.

by Expert (4,460 points)
0 like 0 dislike

Google New Grad phone screen (rejected)

 April 23, 2020

You are given a list of salaries on coseciutive days and integer K. Find two coseciutive not overlapping invervals of salaries that sum up to K and cover smalles possible amout of days. Return how much days they cover.

 

Example:
[1, 2, 2, 3, 2, 6, 7, 2, 1, 4, 8], K = 5
Ans: 4, (2, 3 and 1, 4 are smallest inverals and they cover 4 days, day 3 and 4 and day 9 and 10 . Note that 2, 3 and 3, 2 would not be valid anwser because it overlaps)

 

I wasn't given full information or examples at first, interviwer wanted that I understand the question and i am able to give him some examples with results before he gives me his examples.

 

My approach was dynamic programming, creating two DP arrays. One with best result (found by sliding window) coming from left and the other one with best result coming from right. Then just iterate once over those two arrays to find best result sum. Interviewer was very happy with that approach but I ran out of time while my code still had some bugs (that i see now :) ).

 

After that i was invited to a second phone interview.

 

The question started easily, I was given a interface of a serivice for logging how much time a request took. There were two methods, both taking String requestId as parameter - startRequest() and endRequest(). I have implemented it using a HashMap, added some edge case checks (like handling scenario if endRequest is executed before startRequest). After that i was asked how would i unit test such a service. Had a good converserion with interwiewer about few approaches like tracking map size or using mocked object to printing logs and verifing method invocation parameter. It was awsome till this point. Then he asked me follow up: what if we want to print requests in order they were receieved? I needed to ask few clarification questions and is should work like this:

 

When request A comes at time 10 and request B comes at time 20, then if request B is ended at time 30 we cannot print it because there is still not printed request before it. We should wait for A to be ended and then print both A and B (B after A ofcourse). It can get complicated if you think about more requests. Due to time pressure I kept confiusing myself and trying overcomplicated aproaches like graph / tree. At the end i came up with solition using HasMap for tracking request time, Queue for keeping order of printing and HashSet for keeping what requests have already been ended but are still waiting to be printed. The idea is: When request comes in, record it in a Map and add to Queue. When it ends update a map with time that it took and add it to Set of waiting to be printed. Then while waiting to be printed contains(Queue.peek()) keep on printing and poping / removing elements. Unfotunatly my time ended before i could finish it. Got rejected.

 

I have solved 294 questions on LeetCode - 176 medium, 92 easy, 26 hard and around 50 questions on hackerrank. I was also doing mock interview section on LeetCode for Google (got premium) and random question sets, finished 47 mocked interviews (mostly phone screens) with avg score 7.66 at the end. Before my interviews in about 2 weeks period i have solved around 100 questions. It was my first time doing this kind of interviews, stress and time presure is a really big factor. I feel like the second phone interview was really easy and i could ace it with no problems, but on the call my head was empty and i just kept confusing myself. Anyway i'm not losing hope, I will keep prepearing and try next time :). Best of luck to everyone.

 

by Expert (4,460 points)
0 like 0 dislike

Google SWE New Grad..

January 28, 2019

5 Rounds of Interview..

  1. Simple question involving pushing and popping elements off a queue.
  2. Given array, check if there's an arithmetic sequence of length 3. Follow up: given an array, return the length of the longest arithmetic sequence. Similar leet code question (https://leetcode.com/problems/arithmetic-slices/). I gave an N^2 solution for part 1, and gave an N^3 solution for part 2. Optimal solution for part 2 ended up being a N^2 dynamic programming solution.

LUNCH BREAK - walked around with a googler to tour office

  1. Given an array of pairs of floating point numbers, which represent points that lie on a unit circle, sort them in counterclockwise order. You can choose an arbitrary start point as the 'smallest'. At the end, I had like 6 minuites left, and the interviewer said 'we don't have time for another coding problem,' and asked me some theoretical questions on sorting instead. He gave 5 run times in Big theta notation and asked me to rank them from worst to best. And then asked me for comparison based sorting algorithms, what is the best possible runtime, and why.
  2. Graph problem similar to this: https://leetcode.com/problems/robot-room-cleaner/. The problem was somewhat cryptically phrased, but it went something like: Given a m by n grid, fill the grid with random paths. Return the result as a tree.
  3. Graph problem similar to this: https://leetcode.com/problems/evaluate-division/

Applied online. Took over a month to first hear back. After that, took 3.5 weeks to get an offer. Onsite interviewers seem not to have coordinated with each other about what problem they were going to give, as I was asked multiple times to tell them if another person already gave the question.

by Expert (4,460 points)
0 like 0 dislike

Google L6 

Date : May 15, 2021

Phone screening 1 :
Given a chess board an a knight and a starting position return true if Knight can visit all cell

 

  • a backtracking algorithm took 15-20 min to code

 

Followup 1 : How will you change the algorithm if a knight can only visit a cell once.

 

  • changed the code to keep the visited 2D array .

 

Followup 2 : What if some cells are marked blocked. Return true if all remaining cells can be visited.

 

Followup 3 : Return the minimum path to visit all all cell just once.

 

  • Backtracking but I did with BFS and returned the first solution.

 

Onsite

 

1 Coding  : https://leetcode.com/problems/remove-invalid-parentheses/

 

  • First asked to remove invalid brackets and return a solution with maximum length.
  • Followup : can we generate all the possible longest valid parentheses string

 

2 Coding : very similar to https://leetcode.com/problems/logger-rate-limiter/
 - Asked to design a class that will not print the log (an integer) if found in last x sec
 - Interviewer was looking for a good data structure that can print and store it in buffer
 - I did TreeMap but could have just used StringBuffer . I asked should we discard the most recent visited or already added in stream in x sec window - its up to me to decide.

 

3 : System Design -  Ads click optimization . Design a system that can be trained and evaluated to optimize on revenue as objective function. Drilled down on how will you evaluate the model on frequent basis.

 

  • Training objective function :  Imaging coke pays 0.1$ for ad click vs pepsi 0.001$ the optimization will be on total revenue and its possible model will prefer pepsi over coke as it drives heavy traffic.
    Interviewer asked
  • Evaluation sets
  • Data Handling
  • Talk about Read Write and Update scenario
  • Why choose one technology over other
  • Testability

 

4 System Design : Google Event booking system
System will work as part of Google Search

 

  • Able to list different cities in search
  • Filter by city
  • shows and event availability
  • The user should be able to choose a show at a particular cinema and book their tickets.
  • Users should be able to put a hold on the seats for x minutes
  • The user should be able to wait if there is a chance that the seats might become available, e.g., when holds by other users expire.
  • fair, first come . User can hold only upto 10 seats at a time

 

5 Googlenes / Behavior Round

 

  • biggest technical challenge
  • time when you failed
  • had a conflict
  • able to influence
  • cross-team impact situation
by Expert (4,460 points)
0 like 0 dislike
Date : December 27,2021.

Recieved an offer within the last 6 months, I decided to post to LC as I found it very useful for prep.

 

YOE: 2 no well known companies

 

Come from a country where LC interview style questions aren't really a thing so It took a bit of time to ramp up however I did go to university and learn't DS/Algos from classes, decided to read/go through a couple interview prep books (IDK if im allowed to mention them but im sure you will find them) I found the book that starts with elements... and cracking... really useful and would reccomend (Questions weren't in there but topics are useful).

 

Spent around 2-3 months prepping, didn't interview with any other companies and I did around ~250 LC questions all up in LC mostly medium's with ~30 hards. I focused on a per subject basis untill I was confident in the subject then moved on to the next subject for the first ~180 questions then I focused on the google premium tab (Questions weren't in there but good all round practice).

 

I got interviewed from mostly american interviewers, Interviews weren't as hard as others have mentioned (maybe luck?) would reccomend looking into BST's, Tries, string questions, typical graph problems, ensure you learn your DS/Algo fundamentals. They really emphasize on communication and thinking outloud so make sure you can talk out loud and clearly communicate, and treat it like you're solving the problem with a co-worker (I know it can be hard). Also give time complexitys/Space complexitys before you code your problem and ensure that the interviewer is fine with your solution before you code it, dont just jump straight into it.

 

I went into HC with 5 Hires/Strong hires for onsite I believe from the feedback I was given. Won't provide question info because I think the questions were really fair and dont want them to be banned but difficulty would probably be medium's for the first phase then rolled into hard follow ups.

 

The biggest advce I'd give is to have fun and try your best, if not google then you will go to another great company.
by Expert (4,460 points)
0 like 0 dislike

Date : March 31,2021.

Went through the Prelim round, the interviewer asked a medium problem that asked for Topological sorting. Coded the solution in 5 minutes and spent 15 minuites taking interviewer through the different test cases using the solution. After he was satified he gave me what if, I found the hint to be an improvement, not in terms of run-time but just simpler code. I made the improvements and he was satisfied.

 

Onsite:
1.) This round stated with a problem that asked for depth first search, i coded the solution and he added on the problem, for which i modified the approach to cover. He asked me for runtime complexity. I realised the runtime complexity was bad. he asked me for some what if, and i did the changes, they made the code readable but did nothing for runtime. Note: After the interview i thought of a perfect solution that could have improved the runtime complexity a lot, but it didn't come to me during the interview.
2.) In this round i was given a problem that required DFS or BFS, but i found that these solutions will less optimum so i went with Union find. Coded Union-Find and explained the algorithm to the interviewer.
3.) This problem too required DFS/BFS, but i applied Union-find to it, improving the runtime from DFS/BFS, this round went like a dream.
4.) System design problem, discussed capacity estimate, domain design, service design, cache and database sharding. Used the capacity estimate to answer some quatitative questions asked later.
5.) goolyness - Spoke from heart, and itterated real stories from my previous experiance.

 

Got the offer. I think the most important thing for me was time managment, i talked while i coded, explained away as i was writing the code. I wanted to give the most optimal solution, so i went with them, i discussed why the optimal solution is better then the other. After finishing would take one of the test cases and go through the code with that test case - line by line, to talk the interviewer through the solution again and check for any mistakes and corner cases.

 

I think the key was time managment.

by Expert (4,460 points)
0 like 0 dislike

Date : 15th Februrary , 2022 .

I am writing down the whole experience. As it might be useful for anyone aiming for google or any giant tech. I interviewed with them at the end of by 7th semester during undergraduation. (Currenlty I am in my 8th Semester)

 

A random evening, I recieved a call from a google recruiter. Firstly she apologied for calling up late evening. She said her team was impressed by my linkedin profile and wanted to reach out. Then she checked their database wherein I applied for an opening around 8 months back. So they got my contact details. She also said that for some candidates, they directly move to the onsite rounds rather than phone interview if the profile is impressive. And I was one of those!

 

I agree that I have a good prior project and internship experiences and have been contacted by many HRs through Linkedin. But GOOGLE was beyond by dreams. To be honest, at the first glance, I thought it was a prank call, so asked her to email me the job details for which they want to interview me. She did the same and schduled by interviews within next couple of days.

 

It was a long shot also, didn't had enough time for preparation. I tried to prepare mentally to face it though :)

 

All rounds are strictly of 45 mins. They hard stop there! Sharing all the rounds experience, won't share the exact questions as I have signed NOC.

 

Onsite ROUND -1
TECHNICAL ROUND

 

Interviewer was Senior SWE at Google. Didn't turn on his camera as he was having bandwidth issue. Started with his introduction followed by mine. Gave a question staight away. Based on doubly linked list. It was Easy to Medium level question.

 

I took some time to undersatnd it and then explained my approach. He asked about corner cases. After seemed satisfied, asked me to code it. I did it pretty fast, but then missed a corner case, he asked me to recheck, then I spotted it out.

 

Then he asked about my projects and had some discussion on prior internships. Interview ended with if I had any questions for him.

 

Onsite ROUND-2
Googlyness

 

Conducted by Senior Software Engineer at Google. Project Discussions and Behaviorial Questions to check if your values align with that of their's. Think and answer wisely.

 

Onsite ROUND-3
Technical Round

 

Interviewer was SWE at Google Cloud. She didn't introduced her nor asked for mine. She doesn't seemed friendly at all. I became a bit nervous. She jumped to DSA question. Just verbally gave a question something regarding git commits and asked my approach.

 

I tried to think and clearify the question. Then she wrote the question on the coding doc. I understood what she wanted to ask, I gave a binary search approach. She didn't interact much so I don't know if I was on right track. She said to code down whatever I explained. I did it. Then she asked me to explain my code, while I was doing, she doesn't reacted, so it was difficult for me to understand if I was able to make her understand what I wanted. She said, she got what I was doing and lets move to next question as only around 12 minutes to complete the 45 minutes session were remaining.

 

The next question was related to system streams of input. I clearified my doubts but since no sample test case was given, I was struggling to get what exactly is asked. I asked her if she can give me a sample test case. She did so. After looking at sample input I quickly thought of a dynamic programming solution. Explained it to her. She asked me to write the dp equation and complete the function as soon, because we didn't had enough time. She asked about complexity and what my dp vector does etc. The interview ended with any questions I had for her. I asked about her team,tech-stack and her post at Google as she didn't tell at beginning. Interview ended up with a thank you note.

 

I just had one more last round before making it to the hiring team.

 

I really had high hopes. But recieved an rejection mail. Was kinda dissappointed. I am losing my confidence now but anyway it was a long shot. People work for years to get a call from google. I consider making up to that far as my achievement.

 

Don't want to speak about it as it is dishearting to everyone. Rejections are difficult to digest but we all should take it in a positive way and work more harder.

 

LASTLY I WISH VERY BEST TO EVERYONE IN THEIR SEARCH!

by Expert (4,460 points)