DSA Key Problems

Find the City With the Smallest Number of Neighbors at a Threshold Distance

Given weighted undirected roads and a distance threshold, return the city that can reach the fewest other cities within the threshold; choose the greatest city index when tied.