Company: Chargebee
Difficulty: medium
Two Groups Given N student and M enemy relations. You need to divide these N students into 2 groups of equal sizes S such that no two students with direct enemy relations are in the same group. You need to maximize the value of S. Also, it is guaranteed that no student will have enemy relations with more than 2 students. Notes: S is the number of students in a single group. Both groups should have the same number of students i.e. S. Function Description Complete the solve function. This function takes the following 3 parameters and returns the answer: N: Represents a number of students M: Represents the number of enemy relations enemy: Represents the enemy relation Input Format for Custom Testing Use this input format if you are testing against custom input or writing code in a language where we don\'t provide boilerplate code. The first line contains an integer N. The second line contains an integer M. The next M lines contains two space-separated integers, u and v, representing the e