How good would cutting the bridges be?

Computer Science Level pending

As Sheldor the conqueror, you're supposed to conquer the kingdom of Wonder-blunder-berg, which happens to be a collection of cities connected with roads. This is the Adjacency List of the road network of WonderBlunderBerg showing which city has a direct road to which other city.

As you planned before, you are first going to destroy all the bridges in the kingdom. That splits the kingdom into several components.

Among those components, what is the number of cities in the component with the maximum number of cities?

  • A component is a maximal set of cities such that there is a walk between any two cities of the set.
  • A bridge is a road which when removed increases the number of components.
  • The original kingdom is connected, meaning that there is only one component.

Try Also: Can you cut the bridges and conquer?

Problem Loading...

Note Loading...

Set Loading...