PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Coding & Algorithms/Uber

Find earliest common slot

Last updated: Mar 29, 2026

Quick Overview

This question evaluates interval scheduling and search algorithms, API design for time semantics, concurrency control for shared calendars, and performance/complexity analysis within the Coding & Algorithms domain.

  • Medium
  • Uber
  • Coding & Algorithms
  • Software Engineer

Find earliest common slot

Company: Uber

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Onsite

Given calendars for N attendees, each as a sorted list of non-overlapping, closed-open intervals [start, end) in minutes since epoch, and a required meeting duration d minutes, write a function that returns the earliest start time t such that all attendees are simultaneously available for at least d minutes. If none exists, return -1. Each attendee also has a working-hours window for the day. Follow-ups: ( 1) Redesign the API so the function only considers free slots strictly after the current time without accepting 'now' as an argument; discuss using a monotonic clock, testability, and determinism. ( 2) Handle concurrent updates to calendars while find-meeting calls execute; describe thread-safety (locks vs copy-on-write vs versioned snapshots), data structures, and starvation avoidance. ( 3) Analyze time/space complexity and propose approaches for large inputs (e.g., total intervals up to 1e 6).

Quick Answer: This question evaluates interval scheduling and search algorithms, API design for time semantics, concurrency control for shared calendars, and performance/complexity analysis within the Coding & Algorithms domain.

Related Interview Questions

  • Implement stream queries and bounded-difference subarrays - Uber (medium)
  • Implement Minesweeper and Word Search - Uber (medium)
  • Implement Store Autocomplete - Uber (medium)
  • Simulate a Rank-Based Tournament - Uber (medium)
  • Implement Cache Eviction And Seat Assignment - Uber (medium)
Uber logo
Uber
Sep 6, 2025, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
6
0

Given calendars for N attendees, each as a sorted list of non-overlapping, closed-open intervals [start, end) in minutes since epoch, and a required meeting duration d minutes, write a function that returns the earliest start time t such that all attendees are simultaneously available for at least d minutes. If none exists, return -1. Each attendee also has a working-hours window for the day. Follow-ups: (

  1. Redesign the API so the function only considers free slots strictly after the current time without accepting 'now' as an argument; discuss using a monotonic clock, testability, and determinism. (
  2. Handle concurrent updates to calendars while find-meeting calls execute; describe thread-safety (locks vs copy-on-write vs versioned snapshots), data structures, and starvation avoidance. (
  3. Analyze time/space complexity and propose approaches for large inputs (e.g., total intervals up to 1e 6).

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

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

Master your tech interviews with 7,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.