Find the City With the Smallest Number of Neighbors at a Threshold Distance
There are `n` cities numbered `0` to `n - 1`. `edges[i] = [from_i, to_i, weight_i]` is a bidirectional, weighted road between two cities, and `distanceThreshold` is an integer. Return the city with the smallest number of cities reachable through some path whose total distance is at most `distanceThreshold`. If several cities tie, return the one with the greatest number.
30:00
Find the City With the Smallest Number of Neighbors at a Threshold Distance
There are n cities numbered 0 to n - 1. edges[i] = [from_i, to_i, weight_i] is a bidirectional, weighted road between two cities, and distanceThreshold is an integer. Return the city with the smallest number of cities reachable through some path whose total distance is at most distanceThreshold. If several cities tie, return the one with the greatest number.