Google

Google

Leading technology company specializing in search, cloud, and AI.

4 Rounds ~21 Days Very Hard
Start Mock Interview

The Interview Loop

Recruiter Screen (30 min)

Standard fit check, behavioral questions, and resume overview.

Technical Loop (3-4 Rounds)

Deep dive into domain knowledge, coding, and system design.

Interview Question Bank

Cloud Engineer Coding medium

Write a function to validate if a given string is a valid IPv4 address, and then extend it to check if it belongs to a specific CIDR block.

#String Manipulation #Bitwise Operations #Networking
Cloud Engineer Coding medium

Given a list of log entries with timestamps and error codes, write a function to find the top 3 most frequent error codes within a sliding window of 5 minutes.

#Sliding Window #Hash Map #Queue #Data Structures
Data Engineer Coding medium

Given a list of user session time intervals on YouTube represented as [start_time, end_time], write a Python function to merge all overlapping sessions and return the consolidated active viewing periods.

#Arrays #Sorting #Intervals
Data Engineer Coding medium

Write a Python function to parse a massive (100GB+) log file of Google Search queries and return the top K most frequent IP addresses. You have limited RAM.

#Heaps #Hash Maps #Log Parsing #Big O
Data Engineer Coding hard

Implement a rate limiter in Python for an API using a sliding window approach. The rate limiter should allow a maximum of N requests per minute per user.

#Queues #Sliding Window #Concurrency
Machine Learning Engineer Coding hard

Write a function to sample a random node from a massive, distributed graph where you only have access to an API `get_neighbors(node_id)`. You do not know the total number of nodes.

#Randomized Algorithms #Graph Theory #Reservoir Sampling #Markov Chains
Machine Learning Engineer Coding medium

Implement a custom sparse matrix-vector multiplication (SpMV) algorithm. Assume the sparse matrix is provided in Compressed Sparse Row (CSR) format.

#Linear Algebra #Data Structures #Performance Optimization
Machine Learning Engineer Coding hard

Given an array of integers representing the execution times of ML training jobs and an integer K representing the number of available GPUs, partition the jobs to minimize the maximum execution time on any single GPU. Jobs must be scheduled in contiguous subarrays.

#Binary Search #Greedy Algorithms #Dynamic Programming
Machine Learning Engineer Coding medium

Given a 2D grid representing a cluster of TPU v5e pods where '1' is an active pod and '0' is inactive, write an algorithm to find the maximum area of connected active pods. Pods are connected horizontally or vertically.

#Graph Theory #Depth-First Search #Breadth-First Search #Matrix
ML Engineer Coding hard

Implement a K-means clustering algorithm from scratch in Python.

#K-Means #Clustering
ML Engineer Coding hard

Implement logistic regression with gradient descent in NumPy.

#Logistic Regression #NumPy
ML Engineer Coding medium

Implement a sliding window approach to detect anomalies in a time series.

#Anomaly Detection #Time Series
Software Engineer Coding hard

Design a data structure for Google Search Autocomplete that supports adding new search queries, updating the frequency of a query, and retrieving the top 'k' most frequent queries that start with a given prefix in real-time.

#Trie #Heap #Hash Map #Design
Software Engineer Coding medium

Given a list of Google Calendar events for 'n' users, where each event consists of a start and end time, and a required meeting duration 'k', find all available time slots where all 'n' users can attend a meeting.

#Intervals #Two Pointers #Sorting
Software Engineer Coding medium

You are given a stream of Google Ads click events. Implement a sliding window counter that returns the number of clicks in the exact last 5 minutes. The stream is highly concurrent.

#Concurrency #Sliding Window #Queues #Data Streams
Software Engineer Coding hard

Given a 2D grid representing a Google Maps satellite image where '1' is land and '0' is water, find the minimum number of days to connect two disconnected islands. You can change one '0' to '1' per day.

#BFS #DFS #Matrix
Software Engineer Coding medium

You are given an array of integers representing the CPU load of a Google server cluster over time. Find the maximum contiguous subarray sum, but you are allowed to delete exactly one element to maximize the sum.

#Dynamic Programming #Arrays #Kadane's Algorithm
Software Engineer Coding medium

Implement a function to evaluate a mathematical expression given as a string (e.g., '3 + 5 / (2 - 1) * 4'). The expression can contain parentheses, and you must follow standard order of operations. This is used in Google Search's calculator widget.

#Stacks #String Parsing #Math
Software Engineer Coding hard

You are given a map represented as a weighted directed graph. You need to route an electric vehicle from point A to point B. The EV has a maximum battery capacity, and certain nodes have charging stations. Find the shortest path such that the EV never runs out of battery.

#Graphs #Dijkstra's Algorithm #State Space Search
Software Engineer Coding medium

Implement a thread-safe LRU (Least Recently Used) cache. This cache will be used in a high-throughput microservice. Explain how you would minimize lock contention.

#Concurrency #Data Structures #Linked List #Hash Map
Software Engineer Coding hard

You are building a feature for Google Docs. Given a string representing a document and a list of operations (insert, delete, replace at specific indices), apply the operations efficiently. How do you handle overlapping operations?

#String Manipulation #Operational Transformation #Design
Software Engineer Coding medium

Given a stream of user watch events on YouTube (user_id, video_id, timestamp, duration_watched), write a function to find the longest contiguous sequence of videos a user watched where they completed at least 90% of each video.

#Sliding Window #Hash Map #Stream Processing
Software Engineer Coding hard

Design a data structure for Google Search autocomplete. It must support inserting a string with a frequency, and querying the top K most frequent strings that start with a given prefix. Optimize for query latency.

#Trie #Priority Queue #Design #String Manipulation
Software Engineer Coding medium

Implement a system for Google Calendar that takes in a list of N users' daily schedules (lists of busy intervals) and their working hours, and returns all available time slots of duration T where all N users can meet.

#Intervals #Sorting #Two Pointers #Arrays
Software Engineer Coding hard

Given a list of daily budgets and expected returns for various Google Ads campaigns, write an algorithm to allocate a total budget B to maximize the overall return. You can allocate partial budgets to campaigns, but returns diminish non-linearly.

#Dynamic Programming #Greedy Algorithms #Optimization #Math
Software Engineer Coding medium

You are given a map represented as a 2D grid where 0 is a road, 1 is a building, and 2 is an EV charging station. Given a starting position, find the shortest path to an EV charging station. Follow-up: How would you optimize this if we have millions of queries per second for different starting positions on a static map?

#Graph Theory #BFS #Dynamic Programming #Caching

Difficulty Radar

Based on recent AI-sourced data.

Meet Your Interviewers

The "Standard" Interviewer

Senior Engineer

Focuses on core competencies, system constraints, and clear communication.

Simulate

Unwritten Rules

Think Out Loud

Always explain your thought process before writing code or drawing architecture.

Practice Now