Question
An on-call rota lists shifts as [start, end] hour pairs, each occupying the half-open span [start, end); the list is unsorted and shifts may overlap. Return True if every moment from hour from_hour up to hour to_hour is covered by at least one shift. If from_hour equals to_hour there is nothing to cover, so return True. Example: shifts [[0,8],[6,16],[16,24]] cover 0 to 24.
fully_covered(shifts: list[list[int]], from_hour: int, to_hour: int) → bool[[[0,8],[6,16],[16,24]],0,24]outtrueState your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.