2815. Find Maximal Uncovered Ranges

Medium
Array
Sorting

Description

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).

Statistics

Acceptance
49.3%
Submissions
4,324
Accepted
2,133