I am trying to solve the following problem:
There are several cities in the map. We know the distance between each city. We would like to build a road to connect these cities. However, the maximum distance of the road is x. So, what algorithm should I use to find the road that connects as many cities as possible under the constraints?
Thanks!