Skip to content

Google Software Engineer Interview Guide

Comprehensive preparation for Google SWE roles, with emphasis on full-stack AI/ML infrastructure.

Timeline: 4-8 weeks (notoriously variable), 5-7 rounds

RoundFormatDurationFocus
Recruiter ScreenPhone30 minBackground, level calibration
Phone ScreenCoding (Google Meet)45 minDS&A, one medium/hard problem
Onsite 1Coding45 minAlgorithms, data structures
Onsite 2Coding45 minAlgorithms, data structures
Onsite 3System Design45 minLarge-scale distributed systems
Onsite 4Behavioral (Googleyness & Leadership)45 minCulture, collaboration, ambiguity
Onsite 5 (optional)Coding or Design45 minTiebreaker round

After interviews: Hiring Committee review (1-3 weeks), then Team Matching (1-4 weeks). Total timeline can stretch significantly.

  • Base: $180-220K
  • Equity: $200-400K/yr (GSUs, vest over 4 years)
  • Bonus: $15-30% of base
  • Total Comp: ~$400-650K (L5), ~$600K-1M+ (L6 Staff)
  1. Scale is the lens — Every solution is evaluated at Google scale (billions of users, petabytes of data). “How does this work with 1B rows?” is always the follow-up.
  2. Coding fluency matters — Clean, compilable code in 20-25 minutes. They want to see you think in code, not pseudocode.
  3. System design is open-ended — No single right answer. They want structured thinking, trade-off analysis, and the ability to go deep when probed.
  4. Googleyness is real — They evaluate how you handle ambiguity, disagree respectfully, and navigate without authority.
  5. AI/ML is increasingly central — Google is an AI-first company. Expect ML-flavored system design (recommendation systems, search ranking, model serving).
  • 1-2 problems per 45-minute session
  • Google Docs or a simple shared editor (no autocomplete, no running code)
  • Interviewer expects you to write correct code, not pseudocode
  • Follow-ups are common: optimize, handle edge cases, extend
TopicFrequencyAI/ML Relevance
Arrays/StringsVery HighData preprocessing, tokenization
Graphs (BFS/DFS)Very HighKnowledge graphs, dependency resolution
Dynamic ProgrammingHighSequence models, Viterbi algorithm
Trees/TriesHighDecision trees, prefix matching
Hash MapsVery HighFeature stores, caching
Sliding WindowHighStreaming data, time-series
Binary SearchMediumHyperparameter tuning, sorted retrieval
Heaps/Priority QueuesMediumTop-K, scheduling
Union-FindMediumClustering, connected components
ConcurrencyMedium-High (for infra)Model serving, request handling
from collections import deque
def shortest_path_with_constraints(grid, start, end, max_obstacles):
"""BFS with state: (row, col, obstacles_remaining)."""
rows, cols = len(grid), len(grid[0])
queue = deque([(start[0], start[1], max_obstacles, 0)]) # r, c, obstacles_left, dist
visited = set()
visited.add((start[0], start[1], max_obstacles))
while queue:
r, c, obs, dist = queue.popleft()
if (r, c) == end:
return dist
for dr, dc in [(0, 1), (0, -1), (1, 0), (-1, 0)]:
nr, nc = r + dr, c + dc
if 0 <= nr < rows and 0 <= nc < cols:
new_obs = obs - (1 if grid[nr][nc] == 1 else 0)
if new_obs >= 0 and (nr, nc, new_obs) not in visited:
visited.add((nr, nc, new_obs))
queue.append((nr, nc, new_obs, dist + 1))
return -1
def max_sum_subarray_with_constraint(nums, k, max_val):
"""Max sum of subarray of size k where all elements <= max_val."""
window_sum = 0
max_sum = float('-inf')
left = 0
for right in range(len(nums)):
if nums[right] > max_val:
window_sum = 0
left = right + 1
continue
window_sum += nums[right]
if right - left + 1 == k:
max_sum = max(max_sum, window_sum)
window_sum -= nums[left]
left += 1
return max_sum if max_sum != float('-inf') else -1
class TrieNode:
def __init__(self):
self.children = {}
self.top_results = [] # Pre-computed top-K results for this prefix
class AutocompleteTrie:
def __init__(self):
self.root = TrieNode()
def insert(self, word: str, score: float):
node = self.root
for ch in word:
if ch not in node.children:
node.children[ch] = TrieNode()
node = node.children[ch]
# Maintain top-K at each node
node.top_results.append((score, word))
node.top_results.sort(reverse=True)
node.top_results = node.top_results[:10]
def autocomplete(self, prefix: str, k: int = 5) -> list[str]:
node = self.root
for ch in prefix:
if ch not in node.children:
return []
node = node.children[ch]
return [word for _, word in node.top_results[:k]]
  • Minimum window substring — Sliding window + frequency map
  • Word ladder — BFS on word graph
  • Course schedule — Topological sort (cycle detection in DAG)
  • Median of two sorted arrays — Binary search, O(log(m+n))
  • Design a rate limiter — Sliding window counter or token bucket
  • Serialize/deserialize binary tree — BFS or preorder with null markers
  • LRU Cache — DLL + hashmap (same as Anthropic)
  • Merge K sorted lists — Min-heap
  • Trapping rain water — Two-pointer or stack
  • Number of islands — BFS/DFS flood fill

Google interviewers want to see:

  1. Requirements gathering — Functional and non-functional, with numbers
  2. API design — RESTful endpoints or RPC definitions
  3. High-level architecture — Draw the boxes and arrows
  4. Data model — Schema design, storage choices
  5. Deep dive — Interviewer picks 1-2 areas to probe
  6. Scale and reliability — How does it handle 10x traffic? What fails?
[Query] --> [Web Server] --> [Query Parser]
|
[Index Servers (sharded)]
|
[Ranking Service]
|
[Ads Injection]
|
[Result Aggregation] --> [Response]

Key points:

  • Inverted index sharded by document ID or term
  • PageRank precomputed offline, used as a ranking signal
  • Query understanding: spelling correction, query expansion, entity recognition
  • Freshness: real-time index for recent content, batch index for historical
  • Caching: Multi-tier (CDN, query cache, result cache)
  • Upload pipeline: Transcoding to multiple resolutions, adaptive bitrate (HLS/DASH)
  • CDN: Edge caching, hot content replication
  • Recommendation: Collaborative filtering + deep learning (Two-Tower model)
  • Storage: Blob storage for videos, metadata in Bigtable/Spanner

Design a Recommendation System (AI-Flavored)

Section titled “Design a Recommendation System (AI-Flavored)”
[User Action Stream] --> [Feature Store] --> [Candidate Generation]
|
[Ranking Model (ML)]
|
[Filtering & Diversity]
|
[Results]
  • Candidate generation: Approximate nearest neighbors (ANN), collaborative filtering
  • Ranking: Deep neural network (DNN) with user/item features
  • Feature store: Real-time features (last 10 actions) + batch features (user profile)
  • Serving: Pre-compute embeddings, serve with vector DB (ScaNN)
  • Freshness: Balance between exploitation (show known-good) and exploration (discover new)

Highly relevant for AI-focused roles:

  • Model registry: Version control for models, A/B testing support
  • Serving infrastructure: GPU allocation, batching, auto-scaling
  • Feature serving: Low-latency feature retrieval for online inference
  • Monitoring: Model drift detection, prediction quality tracking
  • Canary deployment: Gradual rollout with automated rollback
ResourceCapacity
Single SSD read~100 μs
Single HDD read~10 ms
Network round trip (same DC)~0.5 ms
Network round trip (cross-continent)~100 ms
1 GB over 1 Gbps network~10 sec
Bigtable write~5 ms
Spanner global write~10-100 ms
AttributeWhat They’re Assessing
GoogleynessDo the right thing, comfort with ambiguity, collaborative
LeadershipInfluence without authority, mentoring, raising the bar
Role-Related KnowledgeTechnical depth appropriate for level
General Cognitive AbilityProblem-solving, learning ability
  • “Tell me about a time you had to work with incomplete information.”
  • “Describe a situation where you disagreed with your team’s approach.”
  • “Tell me about a time you had to influence a decision without having authority.”
  • “Describe a project that failed. What did you learn?”
  • “Tell me about a time you helped someone else grow.”
  • Situation: Brief context (1-2 sentences)
  • Task: What was your specific responsibility?
  • Action: What did YOU do? (Be specific about your individual contribution)
  • Result: Quantifiable outcome + what you learned

Key: Google values intellectual humility. Don’t oversell. Acknowledge mistakes and what you’d do differently.

For full-stack AI roles at Google, also prepare:

  • TensorFlow Serving / Vertex AI: Model deployment pipeline
  • MapReduce / Dataflow: Large-scale data processing
  • Bigtable / Spanner: Storage for ML features and metadata
  • Pub/Sub: Event streaming for real-time ML features
  • Kubernetes (GKE): Container orchestration for model serving
  • TPUs: Google’s custom ML accelerators. Know TPU vs GPU trade-offs.
  • Pathways: Google’s next-gen ML infrastructure for multi-task models
  • Gemini: Multimodal model architecture (understand at a high level)
  • Vertex AI: Managed ML platform (training, serving, monitoring)
  1. Leetcode: 150-200 problems, focus on medium/hard. Google draws from a wide range.
  2. Write real code: Practice in Google Docs (no IDE). Get comfortable without autocomplete.
  3. Time yourself: 20 minutes per medium problem, 25 minutes per hard.
  4. System design: Practice with a friend. Draw on a whiteboard or shared doc.
  5. Mock interviews: At least 3-5 before your onsite. Pramp, interviewing.io, or peers.
  6. Read Google engineering blog: Understand their infrastructure philosophy.