Often there are multiple shortest paths between two nodes of a graph. Give a linear-time algorithm for the following task.
Input: Undirected graph G = (V, E) with unit edge lengths; nodes u, v ∈ V.
Output: The number of distinct shortest paths from u to v.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.