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

Compute minimal transfers to settle group expenses

Problem A group of friends go on a trip and share expenses. Each expense is recorded as an object: - payer (string): who paid the full amount - amount...

Coding & Algorithms
11
0
81 people solved
Nov 16, 2025
Google logo
Google
Easy
Software Engineer

Find k pairs with smallest sums

You are given two sorted integer arrays arr1 and arr2 (each sorted in non-decreasing order), and an integer k. Consider all possible pairs formed by t...

Coding & Algorithms
10
0
74 people solved
Nov 1, 2025
Google logo
Google
Easy
Software Engineer

Find largest subset sharing a common digit

You are given a list A of two-digit integers (each from 10 to 99). Two integers are said to “share a digit” if they have at least one digit in common ...

Coding & Algorithms
4
1
49 people solved
Oct 16, 2025
Google logo
Google
Hard
Software EngineerNew Grad Locked

Find numbers with exactly two sum-of-squares forms

This question evaluates understanding of integer representations as sums of two squares and the ability to reason about counting distinct unordered re...

Coding & Algorithms
9
0
64 people solved
Oct 14, 2025
Google logo
Google
Medium
Data Scientist

Minimize L2, L1, and quantile losses

Given an array X of n real numbers, derive the value θ that minimizes the sum of squared deviations Σ(xi−θ)² (mean) and the sum of absolute deviations...

Coding & Algorithms
7
0
64 people solved
Oct 13, 2025
Google logo
Google
Medium
Data Scientist

Implement anagram check and stable deduplication

Part A — Anagram checker: Write a function is_anagram(a: str, b: str, locale: str = 'en') -> bool that returns True iff a and b are anagrams under the...

Coding & Algorithms
4
0
49 people solved
Oct 13, 2025
Google logo
Google
Medium
Software Engineer Locked

Compute sliding-window average excluding top k

This question evaluates a candidate's understanding of sliding-window algorithms, order-statistics maintenance, and data-structure techniques for incr...

Coding & Algorithms
8
0
67 people solved
Oct 5, 2025
Google logo
Google
Medium
Software Engineer

Compute shortest paths with blocked nodes

Given a graph with nodes and edges and a designated source node s, compute the shortest distance from s to every other node. Some nodes are inaccessib...

Coding & Algorithms
13
0
89 people solved
Sep 6, 2025
Google logo
Google
Medium
Software EngineerNew Grad

Solve Banana Speed and Interval Merge

During two technical phone screens for a new graduate software engineering role, the candidate was asked to solve two coding problems: minimum eating ...

Coding & Algorithms
9
0
58 people solved
Jan 27, 2025
Google logo
Google
Medium
Software EngineerIntern

Solve Grid and Counting Problems

A software engineering intern phone screen included two coding tasks: 1. Count islands in a grid Given an m x n grid of characters where '1' re...

Coding & Algorithms
1
0
13 people solved
Jan 25, 2025
Google logo
Google
Medium
Software Engineer

Find shortest path with blocked nodes

Question Given an unweighted graph, a start node, an end node, and a block_set of nodes that cannot be traversed, return the length of the shortest pa...

Coding & Algorithms
6
0
9 people solved
Jul 29, 2025
Google logo
Google
Medium
Software Engineer

Decide string transform with directional tokens and walls

Decide string transform with directional tokens and walls You are given two equal-length strings start and target of length n, each consisting only of...

Coding & Algorithms
5
0
60 people solved
Jul 15, 2025
Google logo
Google
Medium
Data Scientist

Implement Sampling and Minimize Loss in Numerical Coding

Scenario Numerical coding challenges on sampling and loss minimization. Question a) Implement functions to sample from truncated normal distributions ...

Coding & Algorithms
24
0
92 people solved
Jul 12, 2025
Google logo
Google
Medium
Data Scientist

Determine If Two Strings Are Anagrams Efficiently

Scenario Backend service needs to verify whether two user-provided strings are anagrams for text-matching features. Question Implement a Python functi...

Coding & Algorithms
12
0
49 people solved
Jul 12, 2025
Google logo
Google
Medium
Data Engineer

User Activity Analytics: Unique Users per Activity and Average Time on Site

User Activity Analytics You are given a collection of records, where each record captures a single user's action on a website. Each record is a dictio...

Coding & Algorithms
0
0
8 people solved
May 15, 2025
Google logo
Google
Medium
Data Scientist

Implement sampling and subarray scan

A coding interview included the following algorithm questions: 1. You are given access to a function rand01() that returns an independent sample from ...

Coding & Algorithms
4
0
56 people solved
Feb 5, 2025
Google logo
Google
Easy
Data Scientist

Count super-streak segments in an event stream

You are given a time-ordered sequence of events. Each event has: - type, a string or integer event type. - ts, an integer timestamp in milliseconds or...

Coding & Algorithms
12
0
92 people solved
Jan 2, 2025
Google logo
Google
Easy
Software Engineer Locked

Find Common Free Time Slots Across Calendars

This question evaluates a candidate's ability to work with interval merging and sweep-line techniques over multiple overlapping schedules. It tests pr...

Coding & Algorithms
1
1
12 people solved
Jun 22, 2026
Google logo
Google
Medium
Software Engineer Locked

Count Clusters of 2D Points Within a Radius

This question tests graph traversal skills, specifically identifying connected components among a set of 2D points using distance-based adjacency. It ...

Coding & Algorithms
3
1
14 people solved
Jun 18, 2026
Google logo
Google
Medium
Software Engineer Locked

Find the Longest Path of Equal-Valued Tree Nodes

Find the longest path of equal-valued nodes in a binary tree encoded as a breadth-first list. Clarify the ambiguity with strict BST terminology, then ...

Coding & Algorithms
2
0
3 people solved
Jun 11, 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