Given n
cities numbered from 0
to n - 1
, and an array edges
where edges[i] = [fromi, toi, weighti]
represents a bidirectional road between cities fromi
and toi
with travel distance weighti
, you are also given a distance threshold distanceThreshold
.
Your task is to find the city with the smallest number of other cities that can be reached from it through any path such that the total distance is less than or equal to distanceThreshold
.
If there are multiple cities with the same minimal number of reachable neighbours, return the city with the greatest number.