Dynamic Programming
1976. Number of Ways to Arrive at Destination
Weighted undirected graph of n intersections and roads roads[i] = [u, v, time]. Count the number of shortest-time paths from 0 to n−1, modulo 1e9+7. Run Dijkstra while simultaneously accumulating a…
Loading…