Loading...
Loading...
Loading...
A company has n computers and m two-way cables. Print the number of computers in the largest network, where a network is a group of computers that can reach each other.
Example
Input
7 5 0 1 1 2 3 4 4 5 5 3
Output
3
Try the problem first. Open one hint at a time.
Count the nodes of each network while you search it.
Keep the largest count.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor