Shift coverage verification
Your task
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.
Examples
fully_covered(shifts: list[list[int]], from_hour: int, to_hour: int) -> boolExample 1
Input
fully_covered([[0, 8], [6, 16], [16, 24]], 0, 24)Output
True