NeetCode #642LC-1976MediumAdvanced Graphs
← Back to All Problems

#642 · #1976 · Number of Ways to Arrive at Destination(到达目的地的方案数)

📌 Problem Statement & Constraints

You are given n intersections and roads[i] = [u, v, time] as undirected roads. Return the number of ways to travel from 0 to n-1 in the shortest time, modulo 10^9 + 7. Constraints: 1 <= n <= 200, 0 <= roads.length <= n * (n - 1) / 2, 1 <= time <= 10^9.
🔒

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!