Missing Ranges
Easy
Arrays
Array
Given sorted array and range [lo, hi], find missing ranges. Format: a->b or a.
Constraints
Fits in int
Examples
Example 1:
Input: 0 1 3 50 75
0
99
Output: 2
4->49
51->74
76->99
Example 2:
Input:
1
1
Output: 1
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console