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.
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: (