NeetCode #589LC-2492MediumGraphs
← Back to All Problems

#589 · #2492 · Minimum Score of a Path Between Two Cities(两个城市间路径的最小分数)

📌 Problem Statement & Constraints

You are given n cities and roads[i] = [a, b, distance]. A path's score is its minimum road distance. Return the minimum possible score over all paths between city 1 and city n. Constraints: 2 <= n <= 10^5, n - 1 <= roads.length <= 10^5, 1 <= distance <= 10^4; the graph is connected.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!