Graph Problem

3

1 votes
Easy
Problem

Given an undirected graph with N vertices and M edges, what is the maximum number of edges in any connected component of the graph?
In other words, if a given graph has k connected components, and E1,E2,....Ek be the number of edges in the respective connected component, then find max(E1,E2,....,Ek) . 

The graph may have multiple edges and self-loops. The N vertices are numbered as 1,2,..., N.

Input Format:
The first line of input consists of two space separated integers N and M, denoting number of vertices in the graph and number of edges in the graph respectively.
Following M lines consists of two space separated each a and b, denoting there is an edge between vertex a and vertex b.

Output Format:
The only line of output consists of answer of the question asked by Monk. 

Input Constraints:
1≤N≤105
0≤M≤105

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?