Google · Phone screen → Onsite
In processGoogle Intern Prefix Sums and Heaps: 6 Experiences (Part 3 of 8)
Google SWE intern interviews from Aug–Sep 2026: 6 reports with heaps, BFS, prefix remainders and O(1)-space duplicates, plus memory-limit follow-ups.
At a glance
- Process: five virtual onsite (VO) reports and one phone screen (19); three VOs describe two rounds (17, 21, 22) and one had two questions (18).
- Asked recently: BFS and heap tasks (17, 21, 22), duplicate detection under tight space (17, 18), prefix remainders (19), a monotonic-stack visibility count (20) and in-place matrix zeroing (18).
- Difficulty: follow-ups carried most of the weight: no extra space (17, 18), data too big for memory or streamed (18, 19, 21), and deleting expired values from a two-heap median (21).
- Practise first: Sliding Window Median of Response Times, Find the Duplicate Number, Shortest Subarray With a Target Remainder and K Closest Stars from a Data Stream.
Coverage: six Google software engineering / SDE intern reports for the 2027 intern cycle, dated August 5 to September 15, 2026. Locations and results were not given.
In this series (Google 2027 intern tracker)
- Part 1: graphs and OOD
- Part 2: paths, grids, trees
- Part 3 (current): prefix sums and heaps
- Part 4: loops and team matching
- Part 5: grids, DP, OOP and AI
- Part 6: trees and knapsack
- Part 7: PhD rounds and return offers
- Part 8: updates and host calls
- Companion: extra interview rounds
What came up
Half of these six reports leaned on heaps or BFS, and half pushed the base task toward larger data or tighter memory.
| Topic | Reports | Last seen |
|---|---|---|
| Heaps: top K, median, BFS with a min-heap | 3 of 6 | Sep 2026 |
| BFS on graphs and grids | 3 of 6 | Sep 2026 |
| Scale follow-ups: memory limits and streams | 3 of 6 | Sep 2026 |
| Duplicate detection with little extra space | 2 of 6 | Sep 2026 |
| Prefix sums and modular remainders | 1 of 6 | Sep 2026 |
| In-place matrix updates | 1 of 6 | Sep 2026 |
| Monotonic stack | 1 of 6 | Sep 2026 |
Questions we found
Algorithms / Data Structures
| Question | Reports | Last seen |
|---|---|---|
| Detect Duplicate Trace IDs in a Linked List | 1 | Sep 2026 |
| Find the Duplicate Number | 1 | Sep 2026 |
| Set Matrix Zeroes | 1 | Sep 2026 |
| Shortest Subarray With a Target Remainder | 1 | Sep 2026 |
| Count Visible People to the Left | 1 | Sep 2026 |
| Minimum flight hops (practice) | 1 | Aug 2026 |
| Sliding Window Median of Response Times | 1 | Aug 2026 |
| Minimum Distance to Return a Book | 1 | Aug 2026 |
| K Closest Stars from a Data Stream | 1 | Aug 2026 |
6 detailed candidate timelines, loops, and screens
Newest first. The numbers continue across the tracker.
17: Duplicate trace IDs, then a no-extra-space follow-up
Report date: September 15, 2026 · Role: SDE Intern · Stage: VO
Round 1
- Detect Duplicate Trace IDs in a Linked List: each node holds a string trace ID; return whether any ID appears more than once.
- The base answer walks the list and keeps seen IDs in a hash set.
- The follow-up bans extra space. Worth pinning down first: may the list be changed, is the output still a boolean, and can IDs be ordered or only compared for equality?
Round 2
- The candidate noted only "BFS + min-heap"; the task itself was not shared.
18: Duplicate number and matrix zeroing
Report date: September 14, 2026 · Role: SDE Intern · Stage: VO
Question 1
- Find the Duplicate Number:
n + 1integers with exactly one distinct duplicate; useO(1)extra space and beatO(n²)time. - The follow-up dropped the "one duplicate" or "values 1 through n" assumption, so Floyd cycle detection no longer applies without restating the problem.
Question 2
- Set Matrix Zeroes: if a cell is zero, zero its whole row and column, in place.
- The follow-up made the matrix too large for memory and asked about blocks, external storage and multiple passes.
19: Prefix remainders with three follow-ups
Report date: September 11, 2026 · Role: SDE Intern · Stage: phone screen
- Shortest Subarray With a Target Remainder: does some nonempty contiguous subarray have a sum whose remainder mod
70001isk? - Follow-up 1 allowed negative values. Languages treat
%differently, so every remainder gets normalized into[0, 70000]. - Follow-up 2 asked for the shortest such subarray. Keep the latest prefix index for each remainder, not only the earliest.
- Follow-up 3 streamed about one million values under a memory limit. With a fixed modulus, a 70001-entry array can replace the hash map, plus one rolling prefix remainder.
20: How many people each person can see to the left
Report date: September 5, 2026 · Role: Software Engineer Intern · Stage: VO
- Count Visible People to the Left: heights are distinct, and a person sees someone to the left when nobody between them is taller than both.
- Warm-up: in
[1, 10, 6, 7, 9, 8, 2, 4, 3, 5], the last person sees 6 people. - The follow-up asked for the count for every person. A left-to-right monotonic stack pushes and pops each value at most once:
O(n)time and space.
21: Fewest flight hops, then a streaming median
Report date: August 31, 2026 · Role: SWE Intern · Stage: VO · Note: posts from August 30 and 31 describe the same rounds and count once
Round 1
- Cities joined by two-way flights form an unweighted graph; find the fewest hops from start to destination. Closest practice: Shortest Hop Path Between Machines.
- BFS solves the base task. Follow-ups: return the full route, handle disabled flights, and give the full time and space analysis.
Round 2
- Sliding Window Median of Response Times: response times keep arriving; return the median of the latest K.
- A max-heap holds the smaller half and a min-heap the larger half. The hard part is removing values that leave the window.
- Other follow-ups: high data volume, lower memory, duplicates and even-sized windows.
22: Return a book through a grid, then top K stars
Report date: August 5, 2026 · Role: Software Engineer Intern · Stage: VO, two rounds
Round 1
- Minimum Distance to Return a Book: an
m × ngrid has a start cell, libraries and train stations; each station reaches a library at a known extra distance. - BFS from the start, then compare walking straight to a library with walking to a station and adding that station's library distance.
- The report said "minimum walking distance" in one place but its formula added the station distance; the practice page follows the formula.
Round 2
- K Closest Stars from a Data Stream, a question seen earlier in this tracker.
- The candidate weighed sorting against a min-heap, then chose a size-K max-heap for
O(N log K)time. - Tests covered
K = 0,K > Nand equal distances.
Patterns across the reports
- Bigger-data follow-ups. Three of six reports moved the base task to data that does not fit or keeps arriving: an out-of-memory matrix (18), a million streamed values (19) and high-volume response times (21).
- Duplicates under tight space. Reports 17 and 18 both asked for duplicate detection and then took extra space away, in a linked list (17) and an array (18).
- Heaps in the second round. Round 2 used heaps in three reports: a BFS + min-heap task (17), a two-heap median (21) and a size-K max-heap (22).
Common questions
What coding questions do Google 2027 SWE interns get?
In this part: duplicate trace IDs (17), find the duplicate number and set matrix zeroes (18), prefix remainders (19), visible people (20), flight hops and a sliding median (21), and a grid return-distance task with top K stars (22).
What follow-ups does Google ask in intern interviews?
Mostly scale and space: no extra memory (17, 18), data too big for memory (18), a million streamed values (19), and high volume with less memory (21).
How many rounds is the Google intern virtual onsite?
Reports 17, 21 and 22 describe two rounds; report 18 lists two questions. Report 19 was a phone screen.
Does Google ask heap questions in intern interviews?
Yes in three of six reports: a BFS + min-heap round (17), a two-heap sliding median (21) and top K with a max-heap (22).
Keep practicing
- Detect Duplicate Trace IDs in a Linked List: round one of report 17.
- Find the Duplicate Number and Set Matrix Zeroes: the two questions in report 18.
- Shortest Subarray With a Target Remainder: the phone screen in report 19.
- Count Visible People to the Left: report 20.
- Shortest Hop Path Between Machines and Sliding Window Median of Response Times: the two rounds of report 21.
- Minimum Distance to Return a Book and K Closest Stars from a Data Stream: the two rounds of report 22.
- Google coding question bank: every Google coding problem on FastPrep (sign-in needed).
- Google interview guide: the Google interview stages with practice problems for each.
- Google hiring insights: recent application, interview and offer signals for Google.
- Experience feed: more interview reports from other companies and roles.
In this series: Part 1 · Part 2 · Part 3 (current) · Part 4 · Part 5 · Part 6 · Part 7 · Part 8
Sources: Anywhere useful interview info can be found.
Comments
0No comments yet — be the first to share what you know.