Daily challenge for 2026-09-02
610. Earliest Ending Booking Start
You are given a list of bookings, where each booking is represented as an interval [start, end]. Sort the bookings primarily by their end times in ascending order. If two bookings have the same end time, sort them by their start times in ascending order. Return the start time of the booking that ends earliest. If the list of bookings is empty, return -1.
Example:Input: bookings = [[10, 12], [8, 11], [9, 15]]Output: 8
Explanation: Sorting by end times gives [[8, 11], [10, 12], [9, 15]]. The earliest ending booking is [8, 11], and its start time is 8.
Run this challenge interactively in Python or JavaScript when the app loads.