
You are given a 2D integer array ranges where ranges[i] = [start _i , end _i ] denotes that all integers between start _i and end _i (both inclusive ) are contained in the i ^th range.
You are to split ranges into two (possibly empty) groups such that:
Each range belongs to exactly one group.
Any two overlapping ranges must belong to the same group.
Two ranges are said to be overlapping if there exists at least one integer that is present in both ranges.
For example, [1, 3] and [2, 5] are overlapping because 2 and 3 occur in both ranges.
Return the total number of ways to split ranges into two groups . Since the answer may be very large, return it modulo 10 ^9 + 7 .
1 <= ranges.length <= 10 ^5ranges[i].length == 20 <= start _i <= end _i <= 10 ^9