Determine if a set of people can be split into two groups with no mutual dislikes.
Constraints
Example
>>> possible_bipartition(4, [[1, 2], [1, 3], [2, 4]]) True >>> possible_bipartition(3, [[1, 2], [2, 3], [1, 3]]) False >>> possible_bipartition(5, [[1, 2], [2, 3], [3, 4], [4, 5], [1, 5]]) False
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints