Check Whether a Creator Can Host Every Scheduled Live Session

Last updated: November 29, 2026

Quick Overview

A creator has scheduled several Live sessions as [start, end) times. Return True if they can host all of them without any two overlapping.

Meta
Coding & Algorithms
Software Engineer
Meta
November 29, 2026
Software Engineer
Phone Screen
Coding & Algorithms
Easy

0

0

0 solved


A creator has scheduled several Live sessions as [start, end) times. Return True if they can host all of them without any two overlapping.

A quick interval check in the style of Meta's phone-screen warm-ups, framed around a creator planning Instagram Live sessions. The interviewer mostly checks that you sort first, compare neighbors, and write tight code fast enough to leave time for a harder second problem.

What the Interviewer Expects
  • Sorts by start time
  • Compares each session only with the previous one
  • Treats touching sessions as compatible
  • States O(n log n) time
  • Moves quickly so the second question gets time
Key Topics to Cover
Sorting
Intervals
Arrays
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 many hosts would you need if overlaps are allowed?
  • How would you report the first conflicting pair?
  • What if sessions repeat weekly?
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: list of [start, end) sessions, unsorted. Output: True if no two overlap. Sessions that touch (one ends at 3, next starts at 3) are fine. Clarify that start < end for every session....

High-Level Design

After sorting by start, any overlap must appear between adjacent sessions: if session i overlaps some later session k, it also overlaps session i+1, because i+1 starts no later than k and no earlier t...


Submit Your Answer
Markdown supported