Cambium Networks Interview Question

How did you solve the subset problem?