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 Locked

Detect and remove matched words in a char stream

This question evaluates understanding of online stream processing, substring matching, and the use of efficient data structures and algorithms for rea...

Coding & Algorithms
35
0
238 people solved
Feb 7, 2026
Google logo
Google
Easy
Software Engineer

Implement Batched Undo/Redo Layer

You are implementing a simplified document layer for a design tool. The layer stores properties as a map<string, string>. Implement a class that suppo...

Coding & Algorithms
7
0
57 people solved
Feb 4, 2026
Google logo
Google
Easy
Data Scientist Locked

Build next-word predictor with O(1) lookup

This question evaluates skills in language modeling, data structures, algorithmic optimization, and probabilistic sampling, within the Coding & Algori...

Coding & Algorithms
4
1
43 people solved
Feb 2, 2026
Google logo
Google
Hard
Software Engineer

Implement Longest-Match Text Replacement

You are given a text string and a dictionary of replacement entries. Each dictionary entry has the form token:id, where token is a string pattern and ...

Coding & Algorithms
5
0
30 people solved
Jan 20, 2026
Google logo
Google
Hard
Software Engineer Locked

Find best-matching binary pattern with wildcards

This question evaluates pattern-matching and string-algorithm skills, including handling wildcards and variable-length matches, priority-based rule se...

Coding & Algorithms
10
0
114 people solved
Jan 15, 2026
Google logo
Google
Medium
Software Engineer

Find top/bottom-k words in list or stream

You are given words (strings) either as a finite list or as an unbounded stream. 1) List version: Given an array words and an integer k, return: - the...

Coding & Algorithms
14
0
141 people solved
Jan 11, 2026
Google logo
Google
Hard
Software Engineer Locked

Return top-k subset sums in descending order

This question evaluates proficiency in combinatorial reasoning, algorithmic optimization for large search spaces, and efficient extraction of top-k va...

Coding & Algorithms
15
0
116 people solved
Jan 7, 2026
Google logo
Google
Medium
Software EngineerIntern Locked

Design a logger that returns top-K messages

This question evaluates skills in designing in-memory data structures and algorithms for frequency counting and interval querying, including extractin...

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

Find shortest subarray with at least k distinct

This question evaluates proficiency in array manipulation, frequency counting, and efficient tracking of distinct values within contiguous subarrays, ...

Coding & Algorithms
5
0
70 people solved
Jan 6, 2026
Google logo
Google
Medium
Software EngineerIntern Locked

Find shortest subarray with ≥k distinct integers

This question evaluates understanding of array algorithms, handling of distinct-element counting, and the ability to design time- and space-efficient ...

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

Answer parity-alternation range queries

This question evaluates a candidate's ability to reason about array properties and design efficient range-query processing for alternating-parity suba...

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

Find median of merged RLE arrays

The question evaluates understanding of run-length encoding, order-statistics (median) computation, and efficient merging of frequency-annotated seque...

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

Generate all subsets (handle duplicates)

This question evaluates understanding of power-set generation and handling of duplicate elements, measuring competency in combinatorics, enumeration t...

Coding & Algorithms
8
0
65 people solved
Jan 4, 2026
Google logo
Google
Medium
Software EngineerIntern Locked

Maximize 1D deliveries within distance and minimize total distance

This question evaluates combinatorial optimization and constrained matching skills, focusing on reasoning about distance-based pairings, lexicographic...

Coding & Algorithms
7
0
81 people solved
Dec 27, 2025
Google logo
Google
Medium
Machine Learning Engineer

Solve meeting scheduling and robot cleaning tasks

You are given two independent coding problems. --- Problem 1: Prioritized Meeting Scheduling You are asked to schedule meetings in a single meeting ro...

Coding & Algorithms
10
1
128 people solved
Dec 8, 2025
Google logo
Google
Hard
Software Engineer

Find longest duplicated substring

You are given a string s consisting of lowercase English letters. A substring of s is any contiguous sequence of characters, i.e., s[i..j) for 0 ≤ i <...

Coding & Algorithms
10
0
141 people solved
Dec 8, 2025
Google logo
Google
Hard
Machine Learning Engineer

Design data structure similar to LRU cache

You are asked to design and implement a data structure that behaves similarly to an LRU (Least Recently Used) cache, but with a small variation: - The...

Coding & Algorithms
5
1
57 people solved
Dec 8, 2025
Google logo
Google
Easy
Software Engineer

Find largest digit-sharing subset

You are given an array of N integers. Each integer has exactly two decimal digits (i.e., each element is between 10 and 99 inclusive). You want to cho...

Coding & Algorithms
10
0
112 people solved
Dec 8, 2025
Google logo
Google
Easy
Software Engineer

Maximize coins with tokens moving by +3

You are given a 1D board represented by a string s of length n. Each character is one of: - '.' — an empty cell - 'C' — a cell containing exactly one ...

Coding & Algorithms
21
2
203 people solved
Dec 5, 2025
Google logo
Google
Medium
Data ScientistSenior+

Implement Fibonacci with efficiency constraints

Write a function fib(n) that returns the nth Fibonacci number (0-indexed: fib(0)=0, fib(1)=1). Requirements: - Handle n up to at least 10^6. - Discuss...

Coding & Algorithms
6
0
56 people solved
Nov 24, 2025

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