← Google Interview Insights

Google·Software Engineer·Online Assessment (OA)·Intermediate

IntermediatePrefer not to say
Apr 2026Remote

Summary

Google SWE online assessment, one coding problem that's less about algorithms and more about reading a config file correctly and fixing broken code. The built-in AI tool was allowed which is a weird flex but okay. Felt more like a debugging/systems-thinking exercise than a typical LeetCode grind.

Questions Asked (1)

Q1

Given a config file defining features and their dependencies, fix buggy code so it correctly enables features based on user constraints (country, OS version), resolves transitive dependencies, and detects dependency cycles.

Algorithms & Data StructuresRoot Cause AnalysisTechnical Trade-offs
Author's notes

The problem sounds manageable until you realize the bugs are subtle and the config parsing rules matter a lot.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, clarify the requirements and constraints, then systematically debug the code by tracing through the logic for enabling features, resolving dependencies, and detecting cycles. Propose a clean solution using graph algorithms (topological sort, DFS) and validate with test cases covering edge cases.

Pro tip: Demonstrate a structured debugging process: start by writing a failing test case that reproduces the bug, then fix the code incrementally. This shows maturity and a methodical approach that Google values.

1. Understand the problem and constraints

Restate the problem in your own words, identify inputs/outputs, and clarify constraints such as country and OS version filtering, dependency resolution, and cycle detection.

2. Identify the bugs

Review the code to pinpoint issues: incorrect filtering logic, missing transitive dependency resolution, or flawed cycle detection. Use examples to trace the execution.

3. Design the correct algorithm

Outline a solution: build a dependency graph, filter features by constraints, perform topological sort or DFS to resolve dependencies, and detect cycles using visited states.

4. Implement and test

Write clean code for the algorithm, then test with cases including no dependencies, multiple dependencies, cycles, and constraint combinations.

5. Discuss trade-offs and edge cases

Explain time/space complexity, potential optimizations, and how your solution handles edge cases like missing dependencies or conflicting constraints.

Key Points to Mention

  • Graph representation: adjacency list for features and dependencies.
  • Topological sorting to resolve transitive dependencies in correct order.
  • Cycle detection using DFS with recursion stack or Kahn's algorithm.
  • Filtering features based on user constraints (country, OS version) before dependency resolution.
  • Handling of missing or invalid dependencies gracefully.
  • Time and space complexity analysis of the solution.

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