The 12 Google Coding Questions L4 Candidates Are Getting in 2026
A breakdown of the specific coding problems Google L4 candidates have reported encountering this year, what each one is actually testing, & the calibration that separates an L4 pass from a downlevel.
Google’s L4 coding rounds are different from L5 coding rounds in ways most candidates do not internalize.
At L5, the candidate is expected to recognize the pattern within the first minute, produce an optimal solution efficiently, and handle multiple follow-up variations with depth.
The interviewer is grading whether the candidate operates at the speed and depth of a senior engineer.
At L4, the bar is calibrated differently.
The candidate is expected to recognize the pattern, produce a correct solution that may not be optimal on the first attempt, articulate the tradeoffs, and improve it under guidance from the interviewer.
The interviewer is grading whether the candidate has the foundations and the judgment to grow into a senior engineer, not whether they already are one.
This calibration difference is what most candidates miss. They prepare for L4 by drilling L5-level problems, producing inefficient solutions under pressure, and getting downleveled or rejected because their performance read as L4-aspirational rather than L4-solid.
The path to a clean L4 offer is not to perform L5 work poorly. It is to perform L4 work well.
This post breaks down the 12 specific coding problems Google L4 candidates have most frequently reported encountering in 2024 through 2026, what each one is actually testing, and the calibration that separates an L4 pass from a downlevel.
How the Ranking Was Built
The questions below are drawn from publicly reported Google L4 interview accounts on Glassdoor, Blind, levels.fyi, and tech career coaching forums from 2024 through 2026.
Frequency is calibrated by how often each pattern is reported across multiple independent sources.
The specific problems named are real Google questions that have appeared in multiple candidate accounts.
The 12 are not ranked in strict frequency order because Google’s question selection varies significantly by team. They are ordered by the pattern’s importance to L4 preparation, with the most foundational patterns first.
For each question, you’ll get:
The problem and what it sounds like in the interview
The pattern being tested
What L4 calibration looks like specifically (versus L5)
The trap most candidates fall into
For solution-level depth on the underlying patterns (full implementations, edge case handling, multiple worked examples), see Design Gurus’ Grokking the Coding Interview course. This post is the strategic map of what to expect.
Question 1: Two Sum and Its Variants
The problem: Given an array and a target, find two numbers that sum to the target. Variants include: Two Sum II (sorted input), 3Sum, 4Sum, and the harder “find pairs with smallest absolute difference.”
The pattern tested: Hash map lookup (for unsorted Two Sum) or two pointers (for sorted variants).
What L4 calibration looks like: The interviewer expects you to recognize the pattern within 60 seconds. The basic Two Sum should be solved in 5 to 10 minutes total. For 3Sum, expect to spend 20 to 30 minutes including the duplicate-handling discussion. An L4 candidate produces a correct hash map solution for Two Sum without significant pause, and handles 3Sum with one or two clarifying questions and a correct O(n²) implementation.
The trap: Spending too long on Two Sum because you remember the optimal pattern but get distracted explaining edge cases. Candidates who take 15 minutes on Two Sum signal they are not at L4 fluency on hash map basics, which lowers the calibration for the rest of the round.
Question 2: Longest Substring Without Repeating Characters
The problem: Given a string, find the length of the longest substring with no repeating characters.
Common follow-ups include: longest substring with at most K distinct characters, longest substring with exactly K distinct characters.
The pattern tested: Sliding window with a hash map or set.
What L4 calibration looks like: L4 candidates are expected to recognize sliding window as the pattern, articulate why brute force is O(n²) but a window approach reduces it to O(n), and produce a working solution within 15 to 20 minutes. The follow-up variants test whether the candidate can adapt the same pattern to slightly different constraints.
The trap: Defaulting to brute force first and only optimizing under prompting. L4 candidates can produce the brute force as a warm-up if they verbalize that they know it is suboptimal and are starting there to verify understanding. Candidates who produce brute force and then look genuinely surprised when the interviewer asks for better signal that they have not internalized the pattern.
Question 3: Merge Intervals
The problem: Given a list of intervals, merge all overlapping intervals. Variants include: insert a new interval into a sorted list, find the minimum number of meeting rooms required.
The pattern tested: Sorting plus interval comparison, with optional priority queue for the meeting rooms variant.
What L4 calibration looks like: The interviewer expects you to recognize sorting as the necessary preprocessing step, articulate why, and produce a clean implementation that handles edge cases (empty input, single interval, fully overlapping, partially overlapping).
The meeting rooms variant adds a priority queue element that signals L4-vs-L5 calibration: L4 candidates often need a hint to see the heap approach; L5 candidates produce it directly.
The trap: Forgetting to sort the input. Candidates who try to merge intervals without first sorting them produce solutions that fail on specific test cases and look junior in the process.
Question 4: Number of Islands
The problem: Given a 2D grid of 1s (land) and 0s (water), count the number of distinct islands. Follow-ups include: largest island by area, count of islands after each operation in a stream.
The pattern tested: Depth-first search or breadth-first search on a grid, with marking visited cells.
What L4 calibration looks like: L4 candidates should produce DFS or BFS correctly within 20 to 25 minutes, including the iteration over the full grid. Edge cases the interviewer will probe: should diagonal cells count as connected (no, by default), how to mark visited cells without modifying input (use a separate visited array or carefully manage state).
The trap: Modifying the input grid as the “visited” tracker without articulating the tradeoff. Candidates who do this without explanation signal they are not thinking about whether the input should be preserved. L5 candidates explicitly articulate the decision: “I’ll modify the grid in place to save memory, assuming we don’t need to preserve the input.”
Question 5: LRU Cache
The problem: Implement a Least Recently Used cache with get and put operations in O(1) time.
The pattern tested: Hash map combined with a doubly linked list. This is the canonical “compound data structure” problem and shows up in roughly 20 to 25 percent of Google L4 loops.
What L4 calibration looks like: The interviewer expects you to recognize that neither a hash map alone nor a linked list alone can achieve O(1) for both operations. You need both, combined. L4 candidates are expected to articulate this within 5 minutes and produce a working implementation within 35 minutes. The implementation is non-trivial because the linked list pointer manipulation is error-prone.
The trap: Trying to solve it with just a hash map (cannot maintain order in O(1)) or just a linked list (cannot do O(1) lookup). Candidates who go down either path without realizing they need both quickly signal they have not seen this pattern before.
Question 6: Word Break
The problem: Given a string and a dictionary of words, determine if the string can be segmented into space-separated dictionary words.
Follow-up: return all possible segmentations.
The pattern tested: Dynamic programming, often with memoization.
What L4 calibration looks like: L4 candidates should recognize the recursive subproblem structure (can the rest of the string be segmented?) and add memoization. The pure DP table approach is harder; L4 candidates are not required to use it. The follow-up “return all segmentations” is a harder problem that often serves as the L4-vs-L5 differentiator.
The trap: Producing an exponential-time recursive solution without memoization and not recognizing that it will time out. The interviewer is grading whether the candidate sees the overlapping subproblem structure.
Question 7: Course Schedule (Topological Sort)
The problem: Given a list of courses and their prerequisites, determine if all courses can be finished. Variant: return the order in which courses should be taken.
The pattern tested: Topological sort on a directed graph, either via DFS with cycle detection or Kahn’s algorithm with in-degree counts.
What L4 calibration looks like: L4 candidates are expected to recognize the graph structure (prerequisites are directed edges), choose either DFS or BFS approach, and implement cycle detection correctly. The choice between DFS and BFS approaches is calibration: both work, but the explanation of why one was chosen separates a thinking L4 from a memorizing L4.
The trap: Forgetting to handle the case where the graph is disconnected. Multiple test cases at Google have specifically tested whether candidates correctly iterate over all nodes, not just nodes reachable from a single starting node.
Question 8: Kth Largest Element in a Stream
The problem: Design a class that maintains the Kth largest element as numbers are added to a stream.
The pattern tested: Min-heap of size K. This is one of the most discriminating L4 questions because it tests whether the candidate understands why a heap is the right data structure (versus a sorted array, hash map, or naive scan).
What L4 calibration looks like: L4 candidates should articulate why naive approaches fail (sorting on each insert is O(n log n) per insert) and recognize the heap structure within 5 minutes. Implementation is straightforward once the structure is clear. The interviewer is grading whether the candidate sees the structural pattern, not whether they can implement a heap from scratch.
The trap: Suggesting a max-heap instead of a min-heap. The classic intuition error: candidates want to “find the largest” so they reach for a max-heap. The correct choice is a min-heap of size K, because the smallest element in the heap is the Kth largest overall. Candidates who get this backwards have not internalized the pattern.
Question 9: Validate Binary Search Tree
The problem: Given a binary tree, determine if it is a valid binary search tree.
The pattern tested: Tree traversal (typically DFS) with bounds tracking, or in-order traversal with comparison.
What L4 calibration looks like: L4 candidates should recognize that simply comparing each node to its immediate children is insufficient (children’s children also constrain validity). Two clean approaches: pass min/max bounds through the recursion, or do an in-order traversal and verify the result is monotonically increasing. Either is fine; the calibration is in the articulation of why the naive approach fails.
The trap: Producing a solution that compares each node only to its direct children. This is the most common BST validation mistake and signals the candidate has not thought about the global property of BSTs.
Question 10: Word Ladder
The problem: Given two words and a dictionary, find the shortest transformation sequence from one word to the other, changing one letter at a time. Each intermediate word must be in the dictionary.
The pattern tested: Breadth-first search on an implicit graph where words are nodes and edges connect words differing by one letter.
What L4 calibration looks like: This is a harder L4 question. Recognizing that the problem maps to BFS on a graph is the L4-vs-L5 differentiator. L4 candidates may need a small hint to see the graph mapping; L5 candidates produce it directly. Implementation requires careful handling of the visited set and the transformation generation.
The trap: Trying to use DFS instead of BFS, because BFS is the harder pattern to think of. DFS will find a path but not the shortest one. Candidates who default to DFS and only switch under prompting signal weaker pattern recognition.
Question 11: Serialize and Deserialize Binary Tree
The problem: Design an algorithm to serialize a binary tree to a string and deserialize it back to the original tree.
The pattern tested: Tree traversal with marker handling, typically preorder DFS with null markers.
What L4 calibration looks like: L4 candidates are expected to articulate why simply storing values in order is insufficient (the structure is lost) and produce a working preorder traversal with null markers. The deserialize step is harder than serialize and is where many candidates get stuck. Time budget should be roughly 25 to 35 minutes.
The trap: Producing a serialization that does not handle null nodes. Candidates who only serialize non-null nodes produce a format that cannot reconstruct the tree’s structure, which means deserialize is impossible or ambiguous.
Question 12: Trapping Rain Water
The problem: Given an array of bar heights, calculate how much water can be trapped between the bars after raining.
The pattern tested: Two pointers or dynamic programming for the optimal solution. The brute force is O(n²).
What L4 calibration looks like: This is one of the most discriminating L4 questions. The brute force approach is straightforward but slow. The optimal two-pointer approach is non-obvious and tests whether the candidate can see the invariant that allows the optimization. L4 candidates are not required to produce the optimal solution on the first attempt, but they should produce a working brute force quickly and then improve it under guidance.
The trap: Getting stuck trying to find the optimal solution before producing any working solution. L4 candidates who freeze waiting for inspiration fail the round even if their thinking is sound. The L4 pattern is: produce a correct brute force quickly, then optimize. The L5 pattern is: produce the optimal solution directly.
How These Questions Are Actually Distributed in a Loop
A typical Google L4 loop in 2026 includes 4 coding rounds (sometimes 5, sometimes 3 with a system design round added). Across those rounds, you can expect:
One or two questions from the “foundational pattern recognition” category (Questions 1 through 4)
One question from the “compound data structure” category (Question 5 or similar)
One or two questions from the “graph and tree” category (Questions 7, 9, 10, or 11)
Possibly one question from the “harder pattern recognition” category (Questions 6, 8, or 12)
Different teams calibrate slightly differently.
Engineering teams that work on more algorithmic problems (search, ranking, ads) tend toward more compound and graph problems.
Teams focused on systems work tend toward more straightforward pattern recognition.
The distribution matters for your preparation strategy.
You do not need to be elite at all 12 patterns. You need to be solid at the foundational ones and adequate at the harder ones, because the harder ones are less consistently asked.
The L4 Calibration in One Sentence
The single calibration difference between L4 and L5 at Google in coding rounds is this:
At L4, you are expected to produce a correct solution and improve it under guidance. At L5, you are expected to produce the optimal solution directly.
Both levels grade on the same dimensions (problem understanding, pattern recognition, code quality, communication, complexity articulation).
The difference is the speed and independence of the optimal solution.
A candidate who consistently needs guidance to reach optimal solutions is signaling L4. A candidate who consistently produces optimal solutions independently is signaling L5. A candidate who needs guidance even to reach a correct solution is signaling below L4.
This calibration framework is what most candidates miss. They believe they need to produce L5-quality work to pass L4 interviews.
The opposite is closer to true.
Producing L4-quality work cleanly is what gets you an L4 offer. Trying to produce L5-quality work and failing makes you look worse than producing L4-quality work confidently.
What to Do This Week
Three actions if you have a Google L4 loop scheduled in the next 30 to 60 days.
Action 1: Audit your fluency on the foundational patterns. For each of the first 5 questions above (Two Sum variants, Sliding Window, Merge Intervals, Number of Islands, LRU Cache), time yourself solving them. If you cannot produce a correct solution to each of these in 20 to 25 minutes, those are your highest-priority drills. Foundation matters more than depth for L4.
Action 2: Practice articulating the brute force first. For each pattern, practice explicitly stating “the brute force here would be X, but it’s suboptimal because Y, so I’ll do Z.” This pattern is what shows the interviewer you understand the problem space, not just one solution. It also creates space for the interviewer to capture your thinking in the packet.
Action 3: Practice with one hint allowed. Set up mock interviews where you can ask one targeted question per problem if you get stuck. The L4 bar is “produces correct solutions, sometimes with light guidance.” Practicing with limited hints allowed is closer to what the actual loop feels like than pure self-solo practice.
Where to Go Deeper
For solution-level depth on each pattern with multiple worked examples and edge case handling:
Grokking the Coding Interview: Patterns for Coding Questions (Design Gurus) covers the patterns these questions are built on, with 8 to 12 worked examples per pattern
LeetCode filtered by “Google” tag for additional practice problems that have appeared in recent Google interviews
NeetCode 150 for a curated list mapped to the underlying patterns
This post is the strategic map of what to expect at Google L4 specifically in 2026.
The patterns are real, the questions are real, and the calibration is the difference-maker. Internalizing what the L4 bar actually looks like is what most candidates skip, and what most consistently determines who gets the offer.


