Cross Bridges and Conquer
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.
For Sheldor the conqueror to walk from city 1 to city 20, how many minimum bridges would he have to cross?
- 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.