Google — Software Engineer ❌ Failed
Level: Intern
Round: Phone Screen · Type: Coding · Difficulty: 7/10 · Duration: 60 min · Interviewer: Unfriendly
Topics: Arrays, Algorithms
Location: Mountain View, CA
Interview date: 2025-12-15
Got offer: False
Summary
Round 1: Technical Phone
Question: Given a 2D array, with each 3x3 grid representing a group, find the group with the minimum value (minimum number within the group). Follow-up: How to handle invalid groups (grids) containing the value 1, and analyze time/space complexity.
Round 2: Technical Phone
Question: Given a list of recipes (e.g., a cake consists of sugar, oil, flour, and eggs; sugar consists of sucrose), and a list of ingredient inventory, determine if the inventory is sufficient to produce a desired food item. Define the data types yourself. I struggled to finish the coding part.
Details
Technical Phone Interview Questions
Question 1: 2D Array Processing
The interviewer asked me to find the minimum value among groups in a 2D array. Each group was a 3x3 grid. If any cell in a grid contained '1', that grid was invalid and should be ignored. I had to analyze the time and space complexity of my solution.
My Approach:
- Iterate through the 2D array, processing each 3x3 grid.
- For each grid, check for the presence of '1'. If found, mark the grid as invalid.
- If the grid is valid, find the minimum value within the grid.
- Keep track of the overall minimum grid value found so far.
Question 2: Recipe Validation
The interviewer provided a scenario involving recipes composed of ingredients, which themselves could be composed of other ingredients. The goal was to determine if a given inventory of ingredients was sufficient to create a target food item.
My Approach:
- Define data structures for representing recipes and ingredients.
- Implement a recursive function to calculate the total amount of each base ingredient required for the target food item.
- Compare the required amounts with the available inventory.
- Determine if the inventory is sufficient.
Key Insights:
- Data structure design is crucial for handling complex dependencies.
- Recursion can simplify the process of traversing ingredient hierarchies.
- Proper error handling and edge case management are essential.
Preparation Tips & Key Takeaways
What I Learned
- Thoroughly understanding the problem is crucial before jumping into coding.
- Communicating my thought process clearly to the interviewer helps in getting valuable feedback.
- Time management is essential, especially when dealing with multi-faceted problems.
Recommended Preparation
Coding Practice
- Practice array manipulation problems, focusing on edge cases and optimizations.
- Familiarize myself with recursive algorithms and their applications.
Data Structures
- Review different data structures for representing hierarchical data, such as trees and graphs.
- Practice implementing custom data structures to solve specific problems.
Resources I Recommend
- LeetCode: Practice similar problems involving array manipulation and recipe validation.
- Cracking the Coding Interview: Review common data structures and algorithms.