You are given a ranges where ranges[i] = [start_i, end_i] represents an inclusive range from start_i to end_i.
You want to partition ranges into
Each range belongs to exactly one group.
Any two overlapping ranges must belong to the same group.
Two ranges overlap if they have at least one common number.
Return the total number of ways to split ranges into
Constraints:
ranges.length
ranges[i].length
start_i end_i
You are given a ranges where ranges[i] = [start_i, end_i] represents an inclusive range from start_i to end_i.
You want to partition ranges into
Each range belongs to exactly one group.
Any two overlapping ranges must belong to the same group.
Two ranges overlap if they have at least one common number.
Return the total number of ways to split ranges into
Constraints:
ranges.length
ranges[i].length
start_i end_i