← Google Interview Insights

Google·Software Engineer·Onsite - Multi Round·Intermediate

IntermediateRejected
Jun 2026

Summary

Went through the full Google SWE onsite and felt pretty solid coming out of it, two medium coding problems, one graph, one stack, both solved optimally. Behavioral and communication were flagged as strong. Still got rejected by the hiring committee despite both interviewers thinking I'd pass, which honestly just stings in a way that's hard to put into words.

Questions Asked (2)

Q1

Graph traversal medium-difficulty coding problem.

Algorithms & Data Structures
Author's notes

Gave the optimal solution, no issues I can recall.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem constraints and edge cases, then discuss possible traversal algorithms (BFS/DFS) and their trade-offs. Choose the most efficient approach based on the graph representation and problem requirements, and walk through a small example to validate your logic before coding.

Pro tip: Always analyze time and space complexity upfront and discuss potential optimizations, such as using iterative DFS to avoid recursion limits or bidirectional BFS for shortest paths. This shows you think about scalability and production-quality code.

1. Clarify the problem

Ask questions to understand the graph type (directed/undirected, weighted/unweighted), input format, and expected output. Confirm edge cases like disconnected graphs, cycles, and large inputs.

2. Discuss approaches

Outline BFS and DFS, explaining when each is preferable (e.g., BFS for shortest path in unweighted graphs, DFS for topological sort). Mention iterative vs recursive implementations and their trade-offs.

3. Choose and justify

Select the optimal algorithm based on constraints, and justify your choice with time/space complexity analysis. Consider if any modifications (e.g., visited set, queue/stack) are needed.

4. Walk through an example

Trace your algorithm on a small graph to demonstrate correctness and catch off-by-one errors. Verbally explain each step to show your thought process.

5. Code and test

Write clean, modular code with meaningful variable names. After coding, test with edge cases (empty graph, single node, disconnected components) and discuss potential optimizations.

Key Points to Mention

  • Time and space complexity of BFS/DFS (O(V+E) time, O(V) space)
  • Handling disconnected graphs and cycles with visited sets
  • Iterative vs recursive DFS and stack overflow risks
  • Graph representation: adjacency list vs adjacency matrix
  • Edge cases: empty graph, self-loops, parallel edges
  • Potential optimizations like bidirectional search or early termination

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Stack-based medium-difficulty coding problem.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Got the right answer but my implementation used a pointer to track position rather than leaning on a cleaner split approach.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the problem, identify the stack-based pattern (e.g., monotonic stack, parentheses matching), and walk through examples to validate your approach. Discuss trade-offs between different solutions, then implement cleanly with edge cases in mind.

Pro tip: Verbalize your thought process and consider edge cases early; Google values clear communication and thoroughness over rushing to code.

1. Understand and Clarify

Restate the problem in your own words and ask clarifying questions about input constraints, expected output, and edge cases.

2. Identify Pattern and Approach

Recognize that the problem likely involves a stack (e.g., monotonic stack, parentheses matching) and outline your high-level strategy.

3. Walk Through Examples

Test your approach on provided examples and edge cases to ensure correctness and refine details.

4. Discuss Trade-offs

Compare your stack-based solution with alternatives (e.g., brute force, two-pointer) in terms of time/space complexity and practicality.

5. Implement and Test

Write clean, modular code, then mentally run through test cases and check for off-by-one errors or missing edge cases.

Key Points to Mention

  • Time and space complexity analysis (e.g., O(n) time, O(n) space)
  • Choice of data structure (stack) and why it's optimal
  • Handling of edge cases (empty input, single element, nested structures)
  • Potential optimizations or alternative approaches
  • Clear variable naming and code readability
  • Testing strategy including unit tests and corner cases

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.