Company: Buyhatke_15july
Difficulty: medium
Divide and Conquer Problem Description In a class, persons are 'n' identified as Person 1 to Person n. A total of 'm' relationships are given, describing connections between two individuals, stating, "Person a[i] likes b[i], and vice versa." The relationships can be repeated multiple times. The likeliness between individuals adheres to the transitive property, meaning that if Person A likes Person B, and Person B likes Person C, then Person A also likes Person C. The goal is to organize an exam and arrange the persons so that individuals who like each other are not seated in the same class. The task is determining the minimum number of classes needed for the exam. Input Format The first line contains an integer n The second line contains an integer m The following m lines contain the array a. The following m lines contain the array b. Constraints 2 <= n,m <= 2*10 5 1 <= A[i],B[i] <= n Output Format Return an integer as asked in the problem. Examples Example 1: Input: 5 3 2