Find Common Free Time Across an Interview Panel's Calendars

Last updated: November 29, 2026

Quick Overview

Each interviewer on a panel has a sorted list of busy intervals [start, end). Return the list of finite intervals, of at least a given minimum length, during which every interviewer is free, within the span of all their busy times.

LinkedIn
Coding & Algorithms
Software Engineer
LinkedIn
November 29, 2026
Software Engineer
Onsite
Coding & Algorithms
Hard

0

0

0 solved


Each interviewer on a panel has a sorted list of busy intervals [start, end). Return the list of finite intervals, of at least a given minimum length, during which every interviewer is free, within the span of all their busy times.

Scheduling an onsite loop is a real LinkedIn Recruiter and Talent workflow. The interviewer looks for merging k sorted lists of intervals efficiently with a heap, then extracting gaps, and asks about time zones and working hours as follow-ups.

What the Interviewer Expects
  • Realizes free for everyone means gaps in the union of all busy intervals
  • Merges k sorted lists with a min-heap rather than concatenating and sorting
  • Merges overlapping and touching busy blocks
  • Emits gaps of length at least the minimum
  • States O(N log k) time
Key Topics to Cover
intervals
k-way merge
heap
sweep line
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • How would you restrict results to each person's working hours in different time zones?
  • What if you need at least m of k interviewers free instead of all?
  • How would you handle recurring meetings?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Input: schedules[i] is a sorted, non-overlapping list of [s, e) intervals for interviewer i, and min_len. Output: sorted list of [s, e) free gaps of length at least min_len, strictly between...

High-Level Design

A moment is free for everyone exactly when no one is busy, which is a gap in the union of all busy intervals. Since each list is sorted, a k-way merge with a heap keyed by start time yields intervals ...


Submit Your Answer
Markdown supported