Ezvor

2655. Find Maximal Uncovered Ranges

MediumArray Preparing judge… LeetCode
ArraySorting

Hints

Hint 1
The complexity of the solution is independent of the length of the array nums.
Hint 2
Sort ranges by their start points.
Hint 3
An uncovered range should start right after the end of one of the input ranges (or starts at zero) and also ends right before the start of one of the input ranges (or ends at n).