A bunch of people on Facebook would like to find out the largest clique among them.
(Maybe this will be the next Facebook application?)
A clique is defined as a group of people where everyone is friends with everyone else.
Given a list of friends (friendship works both ways), your job is to output the size of this clique.
For the sake of privacy (and your convenience), we have replaced the names of the people with numbers.
Input Specification
Number of people,
Number of friendships,
There will be no duplicate edges.
NOTE:
Output Specification
The size of the maximum clique.
Sample Input
Copy
6 7
2 3
2 4
2 5
3 4
3 5
4 5
5 6
Sample Output
Copy
4
Friends
Comments