← Google Interview Insights

Google·Software Engineer·Technical Phone Screen·Senior

SeniorPrefer not to say
Apr 2026

Summary

Google interview question about routing algorithms for Maps. Not much context on how the full loop went but this particular question stuck with me.

Questions Asked (1)

Q1

How would you decide between two routing algorithms for Google Maps?

Technical Trade-offsAlgorithms & Data StructuresProduct Strategy
Author's notes

This is the kind of question that sounds like a pure algorithms problem but really isn't.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints of the routing problem, such as scale, real-time traffic, and optimization goals. Then compare the algorithms on key dimensions like time complexity, space complexity, accuracy, adaptability, and implementation complexity. Finally, recommend a choice or hybrid approach based on the specific context and trade-offs.

Pro tip: Emphasize that the decision should be data-driven: propose A/B testing or simulation with real traffic data to validate performance before full deployment. Also, consider hybrid approaches that leverage the strengths of both algorithms.

1. Clarify Requirements and Constraints

Ask questions to understand the scale (e.g., global vs. local), real-time traffic updates, latency requirements, and optimization criteria (e.g., shortest time, fuel efficiency).

2. Identify Evaluation Criteria

Define metrics such as preprocessing time, query latency, memory usage, accuracy, scalability, and adaptability to dynamic conditions.

3. Compare Algorithms on Criteria

Analyze each algorithm's theoretical and practical performance against the criteria, using examples like Dijkstra vs. A* or Contraction Hierarchies vs. Highway Hierarchies.

4. Consider Trade-offs and Hybrid Approaches

Discuss trade-offs (e.g., preprocessing vs. query speed) and propose hybrid solutions that combine algorithms for different scenarios.

5. Recommend and Validate

Make a recommendation based on the analysis and suggest validation through simulation or A/B testing with real data.

Key Points to Mention

  • Time and space complexity of algorithms (e.g., Dijkstra O(E + V log V), A* with heuristics)
  • Preprocessing vs. query time trade-off (e.g., Contraction Hierarchies have high preprocessing but fast queries)
  • Scalability to handle millions of nodes and edges, and dynamic edge weights (traffic)
  • Accuracy and optimality guarantees (e.g., A* with admissible heuristic is optimal)
  • Adaptability to real-time traffic and rerouting
  • Implementation complexity and maintainability

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