There is a set of social profiles. Some of them are connected.
Is it possible to split the set into two groups, such that there are no connections inside the group?
// A B C
// A-B B-C [A, C] [B] true,
// A-B B-C A-C [A, C] [B] false
// input [[A,B] [B, C]] output true
// input [[A,B] [B, C], [A, C]] output false
I've found a similar question https://leetcode.com/problems/possible-bipartition/