Contiguous Intervals
You are given a list of unique integers nums
. Return a sorted two dimensional list of integers where each list represents an inclusive interval summarizing integers that are contiguous in nums
.
Constraints
n ≤ 100,000
wheren
is the length ofnums
https://binarysearch.com/problems/Contiguous-Intervals
Examples
Example 1
Input
- nums =
[1, 3, 2, 7, 6]
Output
- answer =
[[1, 3], [6, 7]]
Leave a comment