Algorithm · Rubrik · Medium
Problem There are N people. Person i works during the closed interval [start_i, end_i]. Two people can communicate directly if their intervals overlap (i.e., there exists a time t that belongs to both intervals). A work group is a set of people where any two members can communicate either directly or through a sequence of direct communications. In other words, if we model people as nodes and connect two nodes when their intervals overlap, a work group is a connected…
Checking your access…