Earliest Common Meeting Time
Updated
Problem statement
You are given one day's meeting schedules for several employees. schedules[i][j] = [start, finish] is a half-open busy interval in minutes from the start of the day.
Given a requested meeting length, return the earliest start minute at which every employee is free for the entire meeting. The meeting must finish by minute 1440. Return -1 if no common interval exists.
Function
earliestCommonMeeting(schedules: int[][][], length: int) → intExamples
Example 1
schedules = [[[60,150],[180,240]],[[0,210],[360,420]]]length = 120return = 240Every employee is free from minute 240 through minute 360, so 240 is the earliest valid start.
Example 2
schedules = [[[480,510]],[[240,330]],[[375,400]]]length = 180return = 0All employees are free from minute 0 through minute 180.
Constraints
1 <= schedules.length <= 1000 <= schedules[i].length <= 1000 <= start < finish <= 14401 <= length <= 1440
More ZipRecruiter Online Assessment questions
- Four-Level Banking System with Scheduled PaymentsOA · Seen Oct 2026
- Count Three-Digit Numbers with Distinct DigitsOA · Seen Oct 2024
- Longest Frequency-Bounded SubarrayOA · Seen Oct 2024
- Minimum Changes to Draw a YOA · Seen Oct 2024
- Apply Binary State OperationsOA · Seen Sep 2024
- Simulate Orchard Rot SpreadOA · Seen Sep 2024
- Compare Odd- and Even-Index SumsOA · Seen Sep 2024
- Coordinate Removals with Column GravityOA · Seen Sep 2024
- Lexicographically Smallest End ReversalOA · Seen Sep 2024
- Recursively Expanded Shell Command CountsOA · Seen Sep 2024
Similar questions at other companies
- Earliest Time to Schedule a MeetingMathWorks · OAMathWorks interview questions
- Earliest Meeting Start on a 24-Hour ClockIMC Trading · OAIMC Trading interview questions
- Earliest Time to Schedule a MeetingMicrosoft · OAMicrosoft interview questions
- Earliest Common Meeting StartVisa · OAVisa interview questions
- Smallest Most-Lit Street PositionHudson River Trading · OAHudson River Trading interview questions
- Most Visited Sprint MarkerChubb · OAChubb interview questions
- File Download Coverage PercentagePersona · OAPersona interview questions
- Peak Chat Load Across AgentsCresta · PHONE SCREENCresta interview questions
- Majority Labels over Audio IntervalsNooks · PHONE SCREEN
- Zero Array Transformation IGoogle · ONSITE INTERVIEWGoogle interview questions