|| Google L3 Interview Experience ||
Summary
I recently completed my onsite rounds for a Software Engineer L3 position at Google. I encountered several data structures and algorithms problems, performing well on most, but struggling slightly on a follow-up for one question. I am currently awaiting feedback from the recruiter.
Full Experience
Hi guys,
Recently gave onsite rounds of google, below is the experience:
Phone Screen round:
Create a double ended queue functionalty such as push/pop-front/back, size of double ended queue and printing all elements of queue using only map data structure.Expected TC was O(1) for all the operations other than priniting of elements.
Got the solution, interviewer seemed statisfied with the solution. Self Verdict -> H/SH
Onsite Round 1
Let's say you have given a list of neighborhood, each neighborhood has different houses in it, e.g {{8,2,9}, {4,6,4}, {4,5,1}}. Respective house color is also given {{'x','r','b'}, {'z', 'r', 'q'}, {'c', 'x', 'a'}}.
We need to return the sorted house order with color attached to it but one condition is that one neighborhood can't have same house number twice in it. Result of above example is: {{'1a','2r','4z'}, {'4q','5x','6r'}, {'4c','8x','9b'}}.Got the solution, interviewer seemed statisfied with the solution. Self Verdict -> H/SH
Onsite Round 2
Let's say you have a list of words of all dicitonary and we need to find out the 5 words which have length of five and all have unique characters to them. Basically combined 25 unique chars.Got the solution, interviewer seemed statisfied with the solution. Self Verdict -> H/SH
Onsite Round 3
Let's say you have given a string and list of words. We need to find words that we can make from the given string by deleting chars from string from any position.Eg:
string: "ozweitosgshg", listOfWords: ["egg", "zoo"]
We can make egg word by deleting chars from the string but not zoo. [Note: We can only delete chars, position of chars can't be changed]
Gave a solution for TC: len(string) * len(listofWords). [Brute Force, wasn't able to think of anything else]
Follow up: Interviewer asked what if we have listOfWords given in the starting and we can preprocess it and then find out the same result.
Wasn't able think of any solution in starting, thought of using TRIE but stuck at how can i use it for traversal with given string. Was having discussion and interviewer was giving few hints inbetween but not able to think how we can do it. Then in last five mins of interview got the idea that:
-> we can use unordered map to store the starting root node of trie for starting chars of each word.
-> Then when traversing through the given string, if we get a node value for that curr char in the map then we will insert the children nodes of that node into the map for respective chars and delete that node from curr char map.
-> when curr node of char reached isEndWord = true (trie struct), then we can find out that this word we can make from string.
Interviewer was statisfied with the solution but as I wasn't able to code it.
Self Verdict -> SNH/NH/LNH [NOT SURE]
Googlyness round
Was asked some standard questions.Self Verdict -> LH/H
All interviewers were super friendly and supportive.
Waiting for the feeback from the recruiter. Will share here as soon as I get.
Interview Questions (5)
Create a double ended queue functionalty such as push/pop-front/back, size of double ended queue and printing all elements of queue using only map data structure. Expected TC was O(1) for all the operations other than printing of elements.
Let's say you have given a list of neighborhood, each neighborhood has different houses in it, e.g {{8,2,9}, {4,6,4}, {4,5,1}}. Respective house color is also given {{'x','r','b'}, {'z', 'r', 'q'}, {'c', 'x', 'a'}}. We need to return the sorted house order with color attached to it but one condition is that one neighborhood can't have same house number twice in it. Result of above example is: {{'1a','2r','4z'}, {'4q','5x','6r'}, {'4c','8x','9b'}}.
Let's say you have a list of words of all dicitonary and we need to find out the 5 words which have length of five and all have unique characters to them. Basically combined 25 unique chars.
Let's say you have given a string and list of words. We need to find words that we can make from the given string by deleting chars from string from any position.
Eg:
string: "ozweitosgshg", listOfWords: ["egg", "zoo"]
We can make egg word by deleting chars from the string but not zoo. [Note: We can only delete chars, position of chars can't be changed]
Follow up: Interviewer asked what if we have listOfWords given in the starting and we can preprocess it and then find out the same result.
Standard behavioral questions were asked.