Search
⌘K

Leetcode 1976. Number of Ways to Arrive at Destination

Count how many distinct routes achieve the minimum travel time from node 0 to node n-1 in a connected undirected weighted graph. The standard approach uses Dijkstra with a priority queue to maintain shortest distances and a parallel count array (mod 1e9+7) that accumulates ways when equal shortest distances are found.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.