Maximum Valid Team of Overlapping Employees

Asked at Microsoft · Coding Questions · Difficulty: Medium · Last asked Nov 4, 2026

A company has `n` employees, and each one works a single continuous shift. Two employees can talk to each other when their shifts share at least one moment. You want to pick the largest group of employees in which one member can talk to everyone else in the group.

Loading the problem…