Problem:https://www.codechef.com/problems/UNICOURS
I am not able to understand why maximum of array is taken , there can be few numbers which are less than max and can be added to the number of courses that are not prerequisites for any other course .
Please help .
my code is : https://www.codechef.com/viewsolution/15468701
But still they are the prerequisites of the course with maximum number . In the explanation , it is written that the course should not be the prerequisites of any other course . So the only possible answer is the frequency of the maximal element of the array .
Your code just needs to find the frequency of the maximum element of the array .