FastPrepGet Meeting Intervals (Google Bangalore)
Problems/Get Meeting Intervals (Google Bangalore)

Get Meeting Intervals (Google Bangalore)

Google logoGoogle● MediumFULLTIMEONSITE INTERVIEW

Updated Sep 2026

QuestionFunctionExamplesConstraints

Problem statement

  • You have a list of meetings in your calendar with a start and end time.
  • You are very busy, so meetings can overlap.
  • You also have one "Do Not Schedule" (DNS) interval during which you don't attend any meeting.
  • Any meeting schedule that overlaps with a DNS slot is automatically cut such that it does not overlap with the DNS slot anymore.

Return a list of non-overlapping time intervals when you are in a meeting.

Complete the function getMeetingIntervals in the editor.

getMeetingIntervals has the following parameters:

  1. 1. int[][] meetings: an arr of intervals representing meeting times
  2. 2. Interval dns: an interval representing the "Do Not Schedule" time

int[][]: an arr of non-overlapping intervals when you are in a meeting

Function

getMeetingIntervals(meetings: int[][], dns: int[]) → int[][]

Examples

Example 1

meetings = [[1, 7], [5, 10], [12, 30], [22, 30], [40, 50], [60, 70]]dns = [18, 25]return = [[1, 10], [12, 18], [25, 30], [40, 50], [60, 70]]

🦔

Constraints

  • 0 ≤ meetings.length ≤ 2 * 10^5
  • Every interval is half-open: it includes its start and excludes its end.
  • For every meeting [start, end] and for dns = [dnsStart, dnsEnd], the start is strictly less than the end.
  • Interval endpoints are integers in [-10^9, 10^9].
  • Return the resulting non-overlapping intervals in increasing start-time order.

More Google Onsite Interview questions

  • Route Pattern MatcherPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Evaluate a Nested Math ExpressionPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Distinct Subset SumsONSITE INTERVIEW · Seen Nov 2026
  • Playlist With No Same Artist in a RowONSITE INTERVIEW · Seen Nov 2026
  • Delete Nodes and Return Forest RootsONSITE INTERVIEW · Seen Nov 2026
  • Dice-Walk Winning ProbabilityPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • First and Last Target Position in a Mountain ArrayONSITE INTERVIEW · Seen Nov 2026
  • Lowest Common Ancestor in an N-ary TreePHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • 0/1 Knapsack with Weight and Volume LimitsONSITE INTERVIEW · Seen Nov 2026
  • Batched Subsequence Word MatchesONSITE INTERVIEW · Seen Nov 2026

Similar questions at other companies

  • Merge IntervalsApple · OA · PHONE SCREEN · ONSITE INTERVIEWApple interview questions
  • Merge Overlapping IntervalsAtlassian · PHONE SCREEN · ONSITE INTERVIEWAtlassian interview questions
  • Maximum Concurrent Processes (Bar Raiser Round)Amazon · PHONE SCREEN · ONSITE INTERVIEW
  • Meeting Scheduling SystemHevo Data · ONSITE INTERVIEW
  • Maximum Intervals Overlapping a Fixed-Length WindowBooking.com · ONSITE INTERVIEW
  • Meeting Rooms IISalesforce · ONSITE INTERVIEWSalesforce interview questions
  • Generate Complete Inputs for a Supplied ClassifierGeneral Motors · ONSITE INTERVIEW
  • Minimum Meeting Rooms with AssignmentsUber · PHONE SCREEN · ONSITE INTERVIEWUber interview questions
  • Peak Bike Demand IntervalsFaire · ONSITE INTERVIEW
  • Merge IntervalsSafe Security · ONSITE INTERVIEW

Google interview experiences

  • Google interviews · November 2026
  • Google Software Engineer Onsite Questions: 10 Experiences
  • Google OA: What It Tests (2026)
  • Google L4 SWE Phone Screen: 1 Experience
  • Google ML Engineering Manager Onsite: 1 Experience
  • Google Experienced SWE First Round and Onsite: 1 Experience
All Google interview questionsSee Google hiring insights
Saved
class Solution {
    public int[][] getMeetingIntervals(int[][] meetings, int[] dns) {
      // write your code here
    }

}
Checking account…