In a country, there are n cities and m bi-directional roads. Some of the roads of the country are broken and need repairing. The king of the country wants a good transportation system, so he wants that all the cities of the country must be connected i.E. There must be at least one path to reach a city from any other city.
Answers
Answered by
0
In a country, there are N cities and M bi-directional roads. Some of the roads of the country are broken and need repairing. The king of the country wants a good transportation system, so he wants that all the cities of the country must be connected i.e. there must be at least one path to reach a city from any other city.
The king is also low on budget, so he wants to repair the roads in such a way that the cities of the country must be connected and the cost of repairing is as minimal as possible.
Similar questions