Your question is LeetCode Medium With Follow-Up. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Anduril's Lattice may receive sensor-processing windows that must run on separate channels whenever their time ranges overlap. Given the requested windows, determine the minimum number of channels required and assign every window to a channel.
Two windows [start, end] do not overlap when end <= start for the next window, so a channel can be reused at that boundary.
Implement schedule_sensor_windows(windows).
windows, a nonempty list of two-element integer lists. windows[i] = [start, end] identifies the time range of the ith request.[channel_count, assignments], where channel_count is the minimum number of channels and assignments[i] is the zero-based channel assigned to the original window at index i.def schedule_sensor_windows(windows):