Process outline:
Apply -> (Online Round) -> Recruiter call -> Phone Interview -> Onsite Round 1,2,3 -> Onsite Round 4,5 -> Hiring Committee -> Team Matching -> Offer Review
Apply -> (Online Round) -> Recruiter call -> Phone Interview -> Onsite Round 1,2,3 -> Onsite Round 4,5 -> Hiring Committee -> Team Matching -> Offer Review
Some of the ways to apply:
- Kickstart - Recruiters reach out to people who have secured top ranks in any of the competitions hosted by Google.
- Google Careers Site - Prepare a good resume and apply for relevant roles.
- LinkedIn - Create a strong profile and be active on LinkedIn. Recruiters look for candidates on LinkedIn to fill open positions.
- Referrals
Apply -> (Online Round) -> Recruiter call -> Phone Interview -> Onsite Round 1,2,3 -> Onsite Round 4,5 -> Hiring Committee -> Team Matching -> Offer Review
This call is just to assess if the candidate has strong fundamentals on DSA. Questions were asked in the following sequence:
- Introduce yourself, about your experiences, projects, where I was currently located etc.
- What's the lower bound of time complexity for comparison based sorting algorithms. Ans: O(nlogn)
- Which one is efficient in terms of space complexity : Merge Sort or Heap Sort? Ans: space complexity with heap sort better because it's in place.
- Which of the following Data-structures does not guarantee O(log n) lookup:
- Binary Search tree
- Hash table
- AVL
- Linked list
Ans: Worst case lookup of BST is O(n) if it is skewed, Hash Table is O(n), Linked List is also O(n). AVL tree is balanced and hence guaranteed O(logn) lookup.
- Can you modify string in-place in C++? Ans: Yes
- A simple mathematical puzzle based on probability and independent events.
Post the Recruiter Call, the recruiter will give you some tips on how to prepare for the upcoming interviews and will get your preference of dates and coding language for scheduling the phone interview.
Apply -> (Online Round) -> Recruiter call -> Phone Interview -> Onsite Round 1,2,3 -> Onsite Round 4,5 -> Hiring Committee -> Team Matching -> Offer Review
Phone Interview - Hangouts call - 45 mins:
- You have a 2D vector. How will you access its elements without using a nested loop? Discuss various approaches and drawbacks.
Apply -> (Online Round) -> Recruiter call -> Phone Interview -> Onsite Round 1,2,3 -> Onsite Round 4,5 -> Hiring Committee -> Team Matching -> Offer Review
Onsite Round 1 - Technical - 45 mins:
- Given a nm grid of numbers . You have a ladder of height x. You start at cell (1,1) and want to go to grid (n,m) . From a cell you can move in all 4 directions . You can move from one cell to another only if the difference between the numbers is <= x. Find if given the grid and starting ladder height it is possible to reach the cell (n,m).
Follow up: Find the minimum ladder height x required to reach (n,m) from (1,1)
- Given a grid, with each cell containing a direction (U, D, L, R) meaning they can only go to the cell above it or below it to to its left or to its right from the current cell. Determine if it's possible to go from top left to bottom right.
Follow up: if you are allowed to break this direction rule at any cell and you have to pay a penalty for every time you break it, what's the minimum cost to get from top left to bottom right.
Onsite Round 2 - Technical - 45 mins:
- Given a sorted array that contains n numbers out of which except one value all the other values are repeated twice. Find the number in the array that occurs only once.
Do it with constant space and logn time.
- Two players A and B are playing a game. There is an array of numbers and in each player's turn he/she can take the first number or the first and second numbers or the first, second and third numbers. The next player has to continue from what's left of the array after the previous player's turn. Determine the maximum value(sum of all numbers player 1 picks) player 1 can win.
Onsite Round 3 - Technical - 45 mins:
- Given the length of a race track, L. And the runSpeed and walkSpeed of a person (runSpeed > walkSpeed) determine the minimum time taken to cover the race track if the person can cover atmax M meters by running.
Follow up: The race track is divided into n segments and given as a vector of ints. Same constraints as above but a player can only either walk or run in a particular segment. Not do both. Return minimum time required to cover race track.
Follow up: Same constraints as above. Additionally, given a time T, output the maximum distance that can be covered in T secs. Given a vector of segment lengths, M, walkSpeed, runSpeed, T. It is possible that you may cover only part of the last segment when the timer goes off.
Apply -> (Online Round) -> Recruiter call -> Phone Interview -> Onsite Round 1,2,3 -> Onsite Round 4,5 -> Hiring Committee -> Team Matching -> Offer Review
Onsite Round 4 - Leadership and Googlyness - 30 mins:
- Talk about a time when you had challenges with team mates.
- A time when you had used your communication skills to mobilize others.
Onsite Round 5 - Technical - 45 mins:
- You are given a map of employee ids (eid) unordered_map<int, vector>
The map is of the format Manager eid : {list of eid directly reporting to the manager} (Can be represented as a tree data structure)
What should be the constraints imposed on this data? (no cycles or self loops or duplicates etc)
We calculate FTEScore for an employee as the total number of employees reporting to them directly or indirectly plus 1(self reporting).
Given queries of the format (eid), return the FTEScore for the given eid
Follow up: You are given a value K, which is the maximum number of direct reportees a manager can have.
You are given a query of type (proposed manager eid, new employee id) where you have to assign a manager to a new employee.
You are given a proposed manager id. If the manager already has K direct reportees, assign the new employee to the closest possible manager to the proposed manager. (Closest manager is one who reports to the proposed manager(directly or indirectly), has less than K direct reportees and is closest to the proposed manager in the tree )
Return the assigned manager eid and make necessary changes to the unordered_map.
Follow up: What's the most efficient way to update FTEScores once a new employee joins the organisation.
Some more sample questions:
- Given n cities where each city has a 3 letter airport code (Like say MAA or SYD etc) and the connections bw the cities(graph basically). You are given the schedule or route ( something that looks like ABC -> DEF -> GOO -> GLE ) your friend travelled. However the route may be wrong (Like if cities may be misspelt or the entire city may not be included in the original list of cities). Find the minimum number of corrections to get a valid route/schedule.
- Given an array (may be unsorted) you are given a function that is similar to binary search - except it doesn't always pick the middle element as pivot and may pick a random element as pivot. It may also choose a different strategy for picking the pivot in every iteration of binary search. Basically the pivot picking is unpredictable and is not known to you. Find which element of the array can be found using this modified search function , i.e if I passed to the binary search function this element as a target and the search array - it will be successfully found
- Give two strings A and B. You wanna transform A to B. Only operation allowed is picking a single character in A and replacing all occurrences of it with another character. So say the string is abab and you want it to be xyxy. Transformation is abab > xbxb > xyxy. Find the min number of operations or if it is impossible to transform. And print the operations as well. NOTE: what will you do in case of cycles?
- Given a grid where each cell has a number written on it. From a cell you can jump to any other cell on its same row or column with a value higher than this cell. From some starting cell find the maximum number of jumps you can make.
NOTE: optimal solution in O(n*m) time.
Apply -> (Online Round) -> Recruiter call -> Phone Interview -> Onsite Round 1,2,3 -> Onsite Round 4,5 -> Hiring Committee -> Team Matching -> Offer Review
After the onsite rounds, based on the feedback, the recruiter will forward the candidate's packet (resume, interview feedback etc) to the hiring committee which will make a decision of hire / no-hire based on the collective feedback received from all the interviewers. This process usually takes 10 days to 2 weeks to get over (might take longer).
Apply -> (Online Round) -> Recruiter call -> Phone Interview -> Onsite Round 1,2,3 -> Onsite Round 4,5 -> Hiring Committee -> Team Matching -> Offer Review
Once the candidate gets HC positive, their packet will be floated to different hiring managers who have openings on their team and a team and a hiring manager will be matched.
Apply -> (Online Round) -> Recruiter call -> Phone Interview -> Onsite Round 1,2,3 -> Onsite Round 4,5 -> Hiring Committee -> Team Matching -> Offer Review
The candidate's compensation is decided, the offer is reviewed and delivered.
Some tips for preparation:
- Target to solve 2 questions on Data structures & Algorithms
- Practise >150 Medium - Hard level questions @ Leetcode
- Solve medium question in >20 minutes, hard level question in >45 minutes
- Mock Interview Practice: Practise atleast 2 - 3 times either with friends or online.
Coding Style:
- Code as close to a fully functional working code (production level code). No Pseudo Code.
- Please write well structured, clean and neat code with a consistent coding style! No errors/bugs.
- Use meaningful variable/function names.
- Cover all edge cases and boundary cases. Have a few test cases to dry run.
Frequently asked DS and Algo:
- Binary search
- BFS/DFS/Flood fill
- Tree traversals
- Hash tables
- Linked list, stacks, queues, two pointers/sliding window
- Binary heaps
- Dynamic programming
- Union find
- Ad hoc/string manipulations
- Arrays
- Other good to know topics: Trie, segment trees/Fenwick trees, bitmasks
Communication during interviews:
- You are expected to “Talk and Code”. Always start with some clarifying questions.
- Be very verbal about sharing your thought process with the interviewer, explaining your rationale and approach (how and why did you derive a particular solution)
- Explain your code to the interviewer, the trade-offs between different approaches, the time and space complexity.
- Listen carefully to the interviewer. Integrate hints/suggestions by the interviewer in your solution.
Useful resources:
Watch these YT videos on the channel Life at Google.
- How to: Prepare for a Google Engineering Interview
- Prepare for Your Google Interview: Coding
- How to: Work at Google — Example Coding/Engineering Interview
Cracking the Coding Interview Book - This is one of the most helpful books you may find!!!!