Search
⌘K

Leetcode 2580. Count Ways to Group Overlapping Ranges

Given a list of intervals, count how many ways to assign each interval to one of two groups so that any overlapping intervals are in the same group — equivalently, find the number of connected components in the interval-overlap graph and return 2^(components) modulo 1e9+7.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.