Skip to main content

Google Interview Preparation — DSA & System Design

Curated Question Bank & 2025–2026 Interview Intelligence
Comprehensive compilation of recent high-frequency LeetCode questions, real Google onsite custom problems, system design rounds, and 2025–2026 loop trends for Google Cloud AI Engineer & SWE candidates.
Source reference: FAANG Recent Coding Questions


:::info Key Algorithmic Trends

  • Graphs Dominance: Graph algorithms appear in 76% of onsite loops at L4+.
  • Top-Tier Patterns: Sliding window and binary search on answer space are top-tier recurring patterns.
  • Rising Topics: Trie and Union-Find (Disjoint Set Union) questions are steadily rising.
  • Difficulty Distribution: Approximately 19% of reported onsite problems are LeetCode Hard. Follow-up extensions are standard across all interviews.
  • Google Distinctive Topics: Segment Tree and Fenwick Tree (Binary Indexed Tree / BIT) problems remain a Google-distinctive category rarely seen at other FAANG companies. :::

:::tip 2026 Interview Process Evolution

  • AI-Assisted "Code Comprehension" Round (Piloting in 2026):
    • Candidates read, debug, and optimize an existing codebase with Gemini available in a CoderPad-style environment (file explorer + code editor + AI chat).
    • Interviewers explicitly evaluate and score AI fluency: prompt engineering quality, output validation, and debugging/refactoring AI-generated code.
    • Piloted in H2 2026 for junior/mid-level roles on select US teams, expanding to L5 loops (reported August 2026: candidates explain what unfamiliar Gemini-generated code does, isolate bugs, and propose architectural refactors).
    • Context: Over 75% of new internal Google code is AI-assisted.
  • In-Person Rounds Reinstated:
    • Reinstated for technical hires to combat AI-assisted screening fraud.
    • Hybrid loop structure reported for L4: 2 virtual rounds →\to rapid recruiter feedback →\to 2 in-person rounds.
  • Google Hiring Assessment (GHA):
    • Mandatory online assessment prior to the technical phone screen.
  • Technical Deep-Dive in Googleyness & Leadership (G&L):
    • Now includes a part-technical architecture defense: candidates defend the technical decisions and trade-offs of a real production system they built under rigorous interviewer scrutiny.
  • Early-Career Format Shift (L3/L4):
    • One traditional coding round is replaced by an open-ended engineering problem session focusing on approach, trade-offs, and ambiguous problem derivation over a single rigid answer.
    • Strict production-ready code grading at L4. No dedicated System Design round below L5.
    • Screens often open with a 10-minute resume architecture deep-dive (e.g., Kafka, Redis, API gateways, streaming systems) prior to coding. :::

2. High-Frequency LeetCode Questions​

2.1 Arrays and Strings​

#DoneProblemDifficultyKey Pattern / Topic
1Two Sum🟢 EasyHash Map lookup
2Longest Substring Without Repeating Characters🟡 MediumSliding Window / Hash Set
3Container With Most Water🟡 MediumTwo Pointers (Greedy contraction)
43Sum🟡 MediumTwo Pointers + Sorting
5Group Anagrams🟡 MediumHash Map / Character Frequency count
6Product of Array Except Self🟡 MediumPrefix & Suffix Products
7Merge Intervals🟡 MediumInterval Sorting & Merging
8Minimum Window Substring🔴 HardSliding Window + Frequency Map
9Trapping Rain Water🔴 HardTwo Pointers / Monotonic Stack
10Find And Replace in String🟡 MediumString Manipulation / Sorting offsets
11Maximum Points You Can Obtain from Cards🟡 MediumFixed Sliding Window
12Longest String Chain🟡 MediumHash Map DP / Predecessor lookup
13Minimum Area Rectangle🟡 MediumCoordinate Hash Set / Diagonal search
14Detect Squares🟡 MediumHash Map frequency / Geometry lookup
15Number of Unequal Triplets in Array🟢 EasyCombinatorics / Prefix frequency counts
16Pour Water🟡 MediumSimulation / Two Pointers
17Best Meeting Point🔴 HardMedian minimization / Manhattan distance
18Decode String🟡 MediumStack / Recursive parsing
19H-Index🟡 MediumBucket Sort / Counting Sort
20Amount of New Area Painted Each Day🔴 HardInterval Map / Union-Find jump pointers
21First Missing Positive🔴 HardCyclic Sort / In-place array hashing
22Jump Game🟡 MediumGreedy maximum reach

2.2 Trees and Graphs​

#DoneProblemDifficultyKey Pattern / Topic
1Number of Islands🟡 MediumBFS / DFS / Matrix Flood Fill
2Course Schedule II🟡 MediumTopological Sort (Kahn's / DFS)
3Validate Binary Search Tree🟡 MediumBST In-order Traversal / Range validation
4Binary Tree Maximum Path Sum🔴 HardPost-order DFS / Subtree contribution
5Word Ladder🔴 HardBi-directional BFS / Shortest Path
6Clone Graph🟡 MediumGraph DFS/BFS + Hash Map memoization
7Serialize and Deserialize Binary Tree🔴 HardPre-order Traversal / String encoding
8Accounts Merge🟡 MediumDisjoint Set Union (DSU / Union-Find)
9Evaluate Division🟡 MediumWeighted Directed Graph BFS/DFS / DSU
10Alien Dictionary🔴 HardCharacter Graph + Topological Sort
11The Earliest Moment When Everyone Become Friends🟡 MediumUnion-Find with Connected Component count
12Checking Existence of Edge Length Limited Paths🔴 HardOffline Queries + Union-Find
13Step-By-Step Directions From a Binary Tree Node to Another🟡 MediumLowest Common Ancestor (LCA) + Path reconstruction
14Swim in Rising Water🔴 HardDijkstra (Min-Heap) / Binary Search on Answer
15Path With Minimum Effort🟡 MediumDijkstra / Modified BFS with Priority Queue
16Find Leaves of Binary Tree🟡 MediumPost-order DFS Height calculation
17Pacific Atlantic Water Flow🟡 MediumMulti-source BFS/DFS from ocean borders
18Longest Word in Dictionary🟡 MediumTrie / Hash Set prefix validation
19Delete Leaves With a Given Value🟡 MediumPost-order DFS bottom-up pruning

2.3 Dynamic Programming​

#DoneProblemDifficultyKey Pattern / Topic
1Coin Change🟡 MediumUnbounded Knapsack / 1D Bottom-up DP
2Edit Distance🟡 Medium2D String Alignment DP
3Longest Palindromic Substring🟡 MediumExpand Around Center / 2D DP
4Longest Increasing Subsequence🟡 MediumPatience Sorting + Binary Search (O(Nlog⁡N)O(N \log N))
5Longest Increasing Path in a Matrix🔴 HardMemoized DFS / Topological Sort on DAG
6Burst Balloons🔴 HardInterval / Range DP
7Split Array Largest Sum🔴 HardBinary Search on Answer / Greedy validation
8Longest Arithmetic Subsequence of Given Difference🟡 MediumHash Map DP
9Maximum Number of Points with Cost🟡 Medium2D Grid DP with Left/Right rolling max
10Count Square Submatrices with All Ones🟡 Medium2D Grid DP prefix squares

2.4 Binary Search & Advanced Structures​

#DoneProblemDifficultyKey Pattern / Topic
1Search in Rotated Sorted Array🟡 MediumModified Binary Search on sorted half
2Koko Eating Bananas🟡 MediumBinary Search on Answer space
3Median of Two Sorted Arrays🔴 HardBinary Search partition (O(log⁡(min⁡(M,N)))O(\log(\min(M, N))))
4Implement Trie (Prefix Tree)🟡 MediumTrie node implementation
5LRU Cache🟡 MediumDoubly Linked List + Hash Map
6Kth Largest Element in an Array🟡 MediumQuickselect / Min-Heap
7Find Median from Data Stream🔴 HardTwo Balanced Heaps (Max-Heap + Min-Heap)
8Task Scheduler🟡 MediumGreedy Frequency formula / Max-Heap
9Logger Rate Limiter🟢 EasyHash Map with Timestamp window
10Range Sum Query - Mutable🟡 MediumSegment Tree / Fenwick Tree (Binary Indexed Tree)
11Count of Range Sum🔴 HardMerge Sort / Fenwick Tree on Prefix Sums
:::info Google Distinctive Topic: Segment Trees & Fenwick Trees (BIT)
Segment Tree & Fenwick Tree (Binary Indexed Tree / BIT) problems are heavily favored at Google compared to other FAANG companies. If interviewing for L4/L5+, ensure you understand range queries and point/range updates with logarithmic time complexity.
:::

3. Google Custom & Real Onsite Interview Problems​

The following problems were reported directly from Google onsite, technical screening, and OA loops (including 2025–2026 reports). They emphasize deliberate ambiguity, production-ready edge cases, and scalable algorithmic design.

#DoneProblem TitleInterview RoundCore Concept & Description
1Restaurant Waitlist Data StructureL4 Phone ScreenDesign an interactive waitlist supporting addGroup, group departure anytime, and seating the best group for an available table size by arrival order and capacity. (Balanced BST / Ordered Map / Priority Queue)
2Number of Lakes on an IslandL4 Phone ScreenGiven a 2D grid of water and land, plus a specific starting land coordinate, count fully enclosed lakes inside the island. (Multi-source Flood-Fill / Grid BFS)
3Root an Undirected Acyclic Graph as a Binary TreePhone ScreenGiven a graph where each node has degree <= 3, determine which node can serve as the root such that the entire tree forms a valid binary tree. (Tree Degree & Center / Layer BFS)
4Alternating-Color Tree RootPhone ScreenGraph vertices are colored black/white. Find an optimal root vertex such that node colors strictly alternate on every layer/depth. (Bipartite Graph validation / Tree BFS)
5Top-K Most Talkative UsersL4 OnsiteIngest chat-log files at arbitrary paths and return top KK users ranked by total word count. Focus on memory limits and streaming execution. (Streaming I/O + Hash Map + Min-Heap)
6Network of TeleportersL4 OnsiteDetermine graph reachability and optimal paths over teleporter portals with directed/bidirectional jumps. (BFS / Shortest Path / Graph Traversal)
7Car Rental Bookings OverlapCoding RoundGiven a batch of rental pickup and return timestamps, find the peak number of concurrent bookings. (Sweep-Line / Difference Array)
8Guess-the-Word Sequence ValidationCoding RoundGiven an ordered set of word guesses and character constraints, decide if the sequences form a mutually consistent global ordering. (Topological Sort / Cycle Detection)
9Coin Collection on a Board2026 Online AssessmentMaximize coins collected across a grid with obstacles, dynamic movement bounds, and turn penalties. (Grid Dynamic Programming / State Simulation)
10Text Editor / Book-Keeping SystemPhone ScreenImplement core text buffer actions: typing, cursor displacement, selection range, and multi-step undo/redo. (Stack / Gap Buffer / Two-Stack Design)
11Lines Needed to Write a String at Given WidthL3 New Grad (2026)"Given a string and an integer width, return how many lines you can write the string in." Intentionally ambiguous: candidate must proactively clarify wrapping policies, hyphens, word boundaries, and whitespace. (String Greedy / Clarification-First)
12URL Router with Placeholder PatternsOnsite (Sep 2026)processHandler registers path patterns (e.g., /users/{userId}/photo/{photoId}); getHandler matches an exact request path to the registered pattern. Handle literal vs wildcard precedence and concurrency. (Trie with Wildcard Nodes)
13Timed-out RPC Calls from Paired LogsOnsite (Sep 2026)Start and end RPC log events arrive chronologically with timeout TT. Identify expired calls, measure open calls against the final recorded timestamp, and sort by start time then call ID. (Hash Map + Priority Queue / Sweep)
14Dependency-Safe Deletion OrderOnsite (Aug 2026)parents[] specifies a forest, augmented with additional [a before b] ordering constraints. Return the lexicographically smallest child-before-parent sequence, or empty on cycle. (Topological Sort with Min-Heap)
15Trimmed Sliding-Window MeansTechnical Screen (Sep 2026)For each sliding window of fixed size, trim the kk largest values (accounting for duplicate counts) and output the remaining mean as an irreducible fraction. (Two Balanced Heaps / Ordered Multiset)
16Group Courses into Earliest Possible RoundsL4 Onsite (Sep 2026)Round 1 has no prerequisites; course goes in round r+1r+1 where rr is its latest prerequisite's round. Return nested lists sorted within rounds, or empty on cycle. (Parallel Courses / Kahn's Algorithm)
17Deduplicate & Order Batch and Streaming LogsPhone Screen (Jul 2026)Deterministic deduplication under first-seen and latest-seen semantics; handles out-of-order records, stale timestamps, and window expiry up to 200,000 ops. (Ordered Dict / LRU Cache / Sliding Window)
18Connected Clusters of 2D PointsTechnical Screen (Jul 2026)Points within Euclidean distance RR are transitively linked. Must handle duplicate coordinates, exact integer squared distance comparison, and integer overflow. (Union-Find with Spatial Grid Hashing)
19Prefix-Matching Simple Paths in a Labeled GraphSenior Onsite (Aug 2026)Count all simple paths whose edge labels spell every non-empty prefix of a query string. Paths may originate at any vertex and must not revisit vertices. (DFS Backtracking with Trie Pruning)
20Players with Fixed RankingsCoding Round (Aug 2026)Given NN players and directed match outcomes, identify all players whose exact global ranking is deterministically fixed by transitive wins and losses. (Transitive Closure / Bitsets / Floyd-Warshall)
21Rectangle Increments on a GridCoding Round (Jul 2026)Apply a large batch of inclusive rectangle +1+1 updates to an n×nn \times n matrix and return the final values for all cells in optimal time. (2D Difference Array + 2D Prefix Sums)
22Three Path Tasks on a Weighted Binary GridSenior Onsite (Jul 2026)Three progressive tasks: (1) Top-to-bottom reachability, (2) Deterministic enumeration of all simple paths, and (3) Minimum-cost path through blocked/weighted cells. (BFS →\to Backtracking →\to Dijkstra)

4. Google System Design Topics​

System design rounds appear at L5+ (and are increasingly woven into senior AI/Cloud engineering loops). These problems demand high-scale distributed systems thinking, failure domains, and modern AI/LLM serving architectures.

#DoneSystem Design ProblemKey Architecture & Focus Areas
1Connection-Degree System for a Social NetworkGraph partitioning at scale, degrees of separation (NN-hop BFS), bi-directional search, caching hot nodes, graph databases.
2Near-Real-Time Logs & Metrics PipelineHigh-throughput distributed ingestion (Kafka/PubSub), stream processing (Flink/Beam), LSM-tree storage, distributed aggregation, query latency SLAs.
3Task Scheduler for Opaque Video-Generation Jobs ("Design Sora")Asynchronous job queues, GPU worker orchestration, execution timeouts, idempotent retries, backpressure, progress streaming.
4Security Monitoring Framework for Cloud InfrastructureReal-time threat detection, anomaly detection at multi-petabyte scale, audit trail ingestion, fan-out event routing, alert deduplication.
5Design Google Drive / Maps / YouTube / SearchDistributed blob storage and deduplication, geospatial quadtrees/tile serving, video chunking/CDN delivery, crawler/indexer/ranking pipeline.
6Enterprise AI / ML System DesignLLM inference gateway, dynamic model batching (vLLM/Triton), semantic caching, RAG retrieval pipelines, rate-limiting, and evaluation telemetry.
7Polite Distributed Web Crawler (~10B Pages)Host-aware crawl frontier, DNS caching, robots.txt enforcement, content fingerprinting/dedup, politeness rate limits, distributed recrawl schedule (Senior Onsite, Aug 2026).
8Music Recommendation System with LLM Agent in the LoopMulti-stage candidate retrieval (vector similarity + collaborative filtering), cross-encoder re-ranking, LLM conversational agent feedback loop, cold-start handling, offline vs. online A/B testing (Aug 2026).