Reported November 2024
Googlearray

Get Meeting Intervals

Reported by candidates from Google's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Google OA. Under 2s to a working solution.
Founder's read

Google's November 2024 OA asked candidates to work with meeting intervals, a classic array manipulation problem that looks simple until you realize the interval merging trick. You're given overlapping or adjacent meetings and need to consolidate them into a single list. It's not about sorting skill alone; it's about recognizing when intervals collide and how to merge them efficiently. If you blank on the approach during the live assessment, StealthCoder will read the problem and hand you the pattern in real time.

Pattern and pitfall

The core pattern here is interval merging, which relies on sorting by start time first, then iterating through to detect overlaps. Many candidates sort and then get lost in the merge logic, trying to handle edge cases manually. The trick: after sorting, you only need to check if the current interval's start is less than or equal to the previous interval's end. If yes, merge by extending the end. If no, add the previous interval to your result and start fresh. Time complexity is O(n log n) due to sorting. The common mistake is forgetting to add the last merged interval after the loop ends. During your live OA, if you freeze on the merge condition, StealthCoder catches the pattern and gives you the exact logic you need without panic.

Memorize the pattern. If you can't, run StealthCoder. The proctor sees the IDE. They don't see what's behind it.

If this hits your live OA

You can drill Get Meeting Intervals cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge.

Get StealthCoder

Related leaked OAs

⏵ Practice the LeetCode equivalent

This OA pattern shows up on LeetCode as merge intervals. If you have time before the OA, drill that.

⏵ The honest play

You've seen the question. Make sure you actually pass Google's OA.

Google reuses patterns across OAs. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Get Meeting Intervals FAQ

Do I need to handle empty input or single meeting?+

Yes. An empty list should return an empty list. A single meeting should return that meeting in a list. Both are quick sanity checks, but they trip people who skip edge cases. Code them first.

What if meetings are identical or one is completely inside another?+

After sorting by start time, identical meetings will be adjacent. When you merge, just extend the end to the maximum of the two ends. A meeting inside another will be caught by the merge condition and absorbed into the outer meeting's interval.

Do I have to sort, or can I use a hash table?+

Sorting is the standard approach and O(n log n). A hash table doesn't directly solve this. Sorting buys you the property that overlaps are detectable in a single pass. Stick with sort unless you want a harder time.

How hard is this problem really compared to other Google OA questions?+

It's medium difficulty. The pattern is learnable in 10 minutes if you've seen interval problems before. If not, it's the kind of problem where the insight clicks once you see the merge logic. Not a trap question; straightforward once you know the move.

What's the most common way to fail this problem?+

Forgetting to add the last interval after the loop, or mishandling the overlap condition (using less-than instead of less-than-or-equal). Both happen under pressure. Write the merge condition clearly and always handle the tail case.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Google.

OA at Google?
Invisible during screen share
Get it