Google Coding & Algorithms Interview Questions

Preparing for Google Coding & Algorithms interview questions means getting ready for a rigorous, process-driven evaluation that emphasizes clean problem solving, clear communication, and algorithmic depth. Google tends to focus on core data structures and algorithmic patterns—arrays and strings, trees and graphs, dynamic programming, hashing, and complexity trade-offs—while also assessing how you reason through edge cases, test your ideas, and write production-minded code in a collaborative environment. Expect live coding on a shared document during screens and multiple 45‑minute coding rounds in onsite or virtual loops, with system design and behavioral evaluations added for more senior roles. Effective interview preparation balances breadth and depth: practice medium-to-hard algorithmic problems under timed conditions, review core computer science fundamentals, and rehearse explaining tradeoffs and correctness aloud. Work on structured problem walkthroughs, mock interviews that simulate Google’s collaborative doc format, and concise post-solution optimizations. Also prepare concise, impact‑focused stories for the behavioral round and plan a realistic multi-week schedule that includes focused drills, full mock loops, and targeted review of persistent weak spots.

224 Questions 1 Company08.01.2026
Showing 20 results
Role
Google logo
Google
Medium
Software Engineer

Recommend top-K movies from similarity graph

Movie Recommendation: Top K You are building a simple movie recommendation feature. Input - A set of movies 0..(M-1). - An undirected similarity graph...

Coding & Algorithms
68
1
529 people solved
Dec 15, 2025
Google logo
Google
Medium
Software Engineer Locked

Find shortest relationship path using BFS

This question evaluates proficiency in graph representations and traversal algorithms—specifically BFS and adjacency-structure construction—for comput...

Coding & Algorithms
21
0
143 people solved
Feb 12, 2026
Google logo
Google
Hard
Software Engineer

Find secret word with match-count feedback

Problem You are given a list of unique lowercase words, all of the same length (e.g., length = 6). One of these words is a secret word. You can intera...

Coding & Algorithms
14
0
148 people solved
Feb 11, 2026
Google logo
Google
Medium
Software Engineer Locked

Design structure for insert and k-th largest

This question evaluates data-structure design and algorithmic efficiency for dynamic order-statistics over a multiset (duplicates allowed), focusing o...

Coding & Algorithms
12
0
86 people solved
Feb 11, 2026
Google logo
Google
Easy
Data Scientist

Build a Next-Word Predictor

Implement a simple next-word model over tokenized training sentences. You need to write two functions: 1. train(sentences): receives a list of tokeniz...

Coding & Algorithms
9
1
81 people solved
Feb 8, 2026
Google logo
Google
Medium
Software Engineer Locked

Determine whether two nodes are related

This question evaluates understanding of graph representations, reachability and connectivity concepts for ancestry relationships, including handling ...

Coding & Algorithms
29
1
198 people solved
Jan 22, 2026
Google logo
Google
Medium
Software Engineer Locked

Find Shortest Queue with Few Calls

This question evaluates algorithm design and analysis skills, focusing on working with restricted data structure APIs and minimizing total operations ...

Coding & Algorithms
6
0
67 people solved
Apr 10, 2026
Google logo
Google
Hard
Software Engineer Locked

Find conflicting pair using black-box run()

This question evaluates algorithm design and query-complexity reasoning, focusing on efficient search strategies for identifying an interacting pair v...

Coding & Algorithms
10
0
92 people solved
Jan 15, 2026
Google logo
Google
Medium
Software EngineerNew Grad

Solve Two Coding Interview Problems

You are asked to solve two independent coding problems. Problem 1: Evaluate Nested Math Expressions Implement a function that evaluates a string expre...

Coding & Algorithms
0
0
10 people solved
Apr 8, 2026
Google logo
Google
Easy
Software Engineer Locked

Implement Memory-Efficient Document Undo/Redo

This question evaluates data structure design and algorithmic reasoning for implementing memory-efficient undo/redo semantics on a key-value document,...

Coding & Algorithms
7
0
60 people solved
Jan 12, 2026
Google logo
Google
Easy
Software Engineer Locked

Design compressed vector and compute dot product

This question evaluates understanding of data structure design, sequence compression concepts (such as run-length patterns), and numeric algorithm eff...

Coding & Algorithms
4
0
82 people solved
Jan 11, 2026
Google logo
Google
Medium
Software Engineer Locked

Solve meeting-room scheduling and shortest paths

This question evaluates proficiency in interval scheduling and resource allocation as well as shortest-path computation in weighted directed graphs, e...

Coding & Algorithms
8
0
151 people solved
Jan 6, 2026
Google logo
Google
Medium
Software Engineer Locked

Design a rolling hit counter API

This question evaluates proficiency with data structures for time-window aggregation and understanding of time/space trade-offs when counting events w...

Coding & Algorithms
9
0
104 people solved
Jan 6, 2026
Google logo
Google
Hard
Software Engineer Locked

Minimize maximum height along a grid path

This question evaluates algorithmic pathfinding and graph-modeling skills, specifically reasoning about grid-based route selection where the objective...

Coding & Algorithms
11
0
71 people solved
Jan 4, 2026
Google logo
Google
Medium
Software EngineerNew Grad Locked

Can board states be transformed?

This question evaluates reasoning about constrained piece movement, string transformation, and invariant-based correctness in the Coding & Algorithms ...

Coding & Algorithms
12
1
182 people solved
Apr 1, 2026
Google logo
Google
Medium
Machine Learning Engineer

Implement a Transformer Block with SwiGLU

Implement a Transformer-style neural network block in Python using either NumPy or PyTorch. Your implementation should include: 1. Multi-head self-att...

Coding & Algorithms
0
0
8 people solved
Dec 24, 2025
Google logo
Google
Medium
Software Engineer

Remove elements to avoid k-prefix duplicates

Question Given two lists listA and listB and an integer k, delete elements from listB so that the first k elements of the new listB share no value wit...

Coding & Algorithms
26
1
62 people solved
Jul 29, 2025
Google logo
Google
Easy
Software Engineer

Find largest group of two-digit numbers sharing digits

You are given an integer array A of length n (1 <= n <= 100). Each element is a two-digit number (e.g., from 10 to 99). Two numbers are considered con...

Coding & Algorithms
18
0
148 people solved
Dec 5, 2025
Google logo
Google
Medium
Software Engineer

Return dictionary words matching a prefix

You are given a list of strings words (a dictionary) and a string prefix. Return all words in words that start with prefix. Clarifications/constraints...

Coding & Algorithms
26
0
192 people solved
Mar 9, 2026
Google logo
Google
Medium
Software Engineer

Return Words Matching a Typed Prefix

Given words and a query prefix, return all words starting with that prefix in lexicographic order. Implement: `python def prefix_matches(words: list[s...

Coding & Algorithms
0
0
8 people solved
Mar 6, 2026

Frequently Asked Questions

How difficult are Google Coding & Algorithms interviews?
Google coding and algorithms rounds are typically medium-to-hard on a LeetCode-style scale, with difficulty increasing by level and role. Phone screens usually target solid problem-solving and clean coding at a medium-to-hard level, while onsite/loop rounds expect more polished, optimized solutions and harder algorithmic thinking for senior roles. Interviewers evaluate algorithm design, correct and maintainable code, complexity trade-offs, and communication. Expect follow-ups that push for edge-case handling and performance improvements. Preparing with progressively harder problems and mock interviews helps bridge the gap to the typical onsite bar.
What is the typical Google interview process and where do Coding & Algorithms questions appear?
The process commonly starts with a recruiter screen, followed by one or two technical phone/video screens that include live coding on a shared environment, and then a virtual or onsite loop of four to six interviews that mix coding, system design (for senior candidates), and behavioral assessments. Coding and algorithms questions appear in the phone screens and in multiple onsite rounds, often as one to two algorithmic problems per technical interview. New graduate roles may include an online assessment stage. The shared-coding document or collaborative pad is a common environment for real-time problem solving.
How long should I prepare for Google Coding & Algorithms interviews?
A focused preparation timeline often ranges from six to eight weeks for candidates with solid fundamentals, and from two to four months for those rebuilding skills or targeting senior levels. Early weeks should refresh data structures, complexity analysis, and basic algorithms; middle weeks should emphasize consistent timed practice of medium to hard problems and pattern recognition; final weeks should include mock interviews, whiteboard or shared-doc practice, and review of common failure cases. Allocate regular, spaced practice and iterative feedback to close gaps, and simulate the exact environment (no IDE, shared doc) before real interviews.
What key subtopics within Coding & Algorithms should I focus on for Google interviews?
Focus on core data structures (arrays, strings, linked lists, stacks, queues, trees, graphs, heaps, and hash tables) and algorithms (sorting, searching, DFS/BFS, shortest paths, topological sorts, greedy strategies, and dynamic programming). Master complexity analysis, common patterns like two-pointers, sliding window, recursion/backtracking, and graph traversal. Also practice windowed aggregates, prefix sums, CTE-like problem decomposition in coding interviews, handling NULLs/edge cases, and thinking about performance trade-offs. Clean, testable code and the ability to explain correctness and runtime are as important as finding a working solution.
What standout tips and common pitfalls should I know when preparing for Google Coding & Algorithms interviews?
Standout tips include asking clarifying questions before coding, outlining the approach and complexity up front, writing a correct simple solution before optimizing, and walking through test cases aloud. Practice in a shared-doc or whiteboard style to mirror the interview environment and time-box your practice. Common pitfalls are not communicating thought process, ignoring constraints and edge cases, prematurely optimizing without a correct baseline, and submitting untested code. Also avoid verbose or unreadable code; prioritize clarity. Mock interviews with feedback are one of the fastest ways to fix these recurring mistakes.

Explore more Google Coding & Algorithms interview questions

Real questions from candidate reports, grouped by role, topic and company.

By role
Other categories at Google
Coding & Algorithms questions at other companies
Browse all