We’re preparing your current view and syncing the latest data.
You are given an integer n representing the number of cities numbered from 0 to n-1. You are also given an array edges where each edges[i] = [from_i, to_i, weight_i] represents a bidirectional weighted edge between cities from_i and to_i, and an integer distanceThreshold. A city is considered reachable from another city if the shortest distance between them is less than or equal to distanceThreshold. Your task is to find the city with the smallest number of reachable cities within the distance threshold. If there are multiple such cities, return the one with the greatest city number.
Return the city number which has the smallest count of reachable cities within the distanceThreshold. If multiple, return the city with the greatest number.