PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/IBM

Compute shared free time intervals

Last updated: Mar 29, 2026

Quick Overview

This question evaluates skills in interval manipulation, schedule normalization, time parsing and time-zone handling, and scalable algorithm and data-structure selection for processing large sets of temporal intervals.

  • Medium
  • IBM
  • Coding & Algorithms
  • Software Engineer

Compute shared free time intervals

Company: IBM

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

You are given schedules for multiple employees. schedules[i] is a list of busy intervals for employee i, where each interval is half-open [start, end) in minutes from 0 to 1440 for a single day. Return all maximal half-open intervals [s, e) during which every employee is free. Requirements: ( 1) Input may contain up to 10^4 total intervals across all employees. ( 2) Intervals within an employee may be unsorted and may overlap; you must normalize as needed. ( 3) Output intervals must be sorted, non-overlapping, and within [0, 1440). Sub-questions: How would you handle schedules provided as strings like "09:30-12:00" and mixed time zones? How would you extend the solution to multiple days or to streaming updates to schedules? Discuss the time and space complexity and the data structures you would choose.

Quick Answer: This question evaluates skills in interval manipulation, schedule normalization, time parsing and time-zone handling, and scalable algorithm and data-structure selection for processing large sets of temporal intervals.

Related Interview Questions

  • Reverse last two characters with space - IBM (nan)
  • Compute minimum rooms for meeting schedule - IBM (nan)
  • Maximize palindromic strings after character swaps - IBM (medium)
  • Find minimum subarray length with k distinct integers - IBM (medium)
  • Find minimum operations to make array sorted - IBM (easy)
IBM logo
IBM
Sep 6, 2025, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
4
0

You are given schedules for multiple employees. schedules[i] is a list of busy intervals for employee i, where each interval is half-open [start, end) in minutes from 0 to 1440 for a single day. Return all maximal half-open intervals [s, e) during which every employee is free. Requirements: (

  1. Input may contain up to 10^4 total intervals across all employees. (
  2. Intervals within an employee may be unsorted and may overlap; you must normalize as needed. (
  3. Output intervals must be sorted, non-overlapping, and within [0, 1440). Sub-questions: How would you handle schedules provided as strings like "09:30-12:00" and mixed time zones? How would you extend the solution to multiple days or to streaming updates to schedules? Discuss the time and space complexity and the data structures you would choose.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More IBM•More Software Engineer•IBM Software Engineer•IBM Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.