Background:
~3 years in a FAANG company
Recruiter reached out via LinkedIn
Tier-3 college graduate
Screening round Question
Matching APKs to Devices in Google Play
Round 1:
A DDA is given where each row has 3 elements [c1, c2, cost] which indicates the cost to travel from c1 to c2. Calculate the minimum cost to travel from source city to destination city.
Solution: Dijkstra algo with few modifications
Follow-up: Calculate the minimum cost if we need to pass another city (say c3) while travelling from c1 to c2.
Solution: Calculate the minimum cost to travel from c1 to c3 and then from c3 to c2.
There was more discussion around basics of Dijkstra Algo and Queues in Java.
Round 2:
Very similar to Detonate the maximum bombs
Follow up on creating a generic function if the criteria of connecting nodes is different.
Round 3:
A consultant needs to make profit by travelling in 2 cities. At any point he can choose to stay at city A, stay at city B or travel from one city to another. Input contains 2 arrays which shows the profit he can earn while staying in the city for a particular day. The profit is zero if he chooses to travel.
E.g.: cityA = [23,4,5,10] , cityB = [21,1,10,100]
Max profit = 133, Path = “ATBB”
Calculate the max profit and print the path for it.
Solution: Recursive solution to try all possibilities to figure out max value. Apply dynamic programming to optimise space and time complexity.
Round 4:
Length of longest increasing sequence in a grid
Solution: Apply DFS to explore all the neighbours and Dynamic programming to memoize the answers for already visited nodes.
Googlyness
This is a behavioural round with simple situation based questions based on your past experiences. Being respectful and pleasant is important here. Preparation for this round can be done by reflecting on your past experiences and your goals.
Example questions: Your biggest achievement in your current role, any major changes that you brought in a project, conflicts with manager and colleagues.
Verdict
Got offer for L4 based on my experience and feedbacks from interviews
I have appeared for Google’s interviews for multiple times in the past and have had some learnings with each of my attempt.
The resources that I followed are listed below:
Striver's A2Z DSA Course
Striver's SDE Sheet
Googlyness by Jeff H. Sipe
I prefer to stick to a limited number of resources to avoid repetition and confusion.
I hope the post helps you in your next interview.
Good Luck! :)