Minimum Relocations for a Cohesive Interval Set

Asked at Amazon · Coding Questions · Difficulty: Medium

Merchants operate over inclusive intervals `[zone_start[i], zone_end[i]]`. A set is *cohesive* if some merchant's interval overlaps (or touches) all the others. Return the minimum number of merchants to remove so the rest are cohesive.

Loading the problem…