Marks :10
: 4 | : 1
There are $$$N$$$ students in the class, and each student has a favorite number $$$F_i$$$ given in the form of the array $$$F$$$.
$$$A$$$ Student is a friend of another student $$$B$$$ if at least one of these two conditions are satisfied
Find the minimum number of groups that can be formed such that in a group, a member is friend with all other members.
A student belongs to exactly one group.
The first line contains one integer $$$1 \le N \le 10^5$$$, denoting the number of students in the class.
The second line contain $$$N$$$ integers,$$$i^{th}$$$ denoting the favorite number of student $$$i$$$
Output the minimum number of groups that can be formed such that in a group, a member is friend with all other members.
4 2 4 6 5
2
4 2 6 3 21
1
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log In
Your challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.