You are given an inclusive range
[lower, upper]
and a sorted unique integer arraynums
, where all elements are within the inclusive range.A number
x
is considered missing ifx
is in the range[lower, upper]
andx
is not innums
.Return the shortest sorted list of ranges that exactly covers all the missing numbers. That is, no element of
nums
is included in any of the ranges, and each missing number is covered by one of the ranges.
1 | class Solution { |