← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
We want to split a group of n people (labeled from 1 to n) into two groups of any size. Each person may dislike some other people, and they should not go into the same group. Formally, if dislikes[i] = [ai, bi], it means it is not allowed to put the people numbered ai and bi into the same group. Return true if and only if it is possible to split everyone into two groups in this way.