Suppose we want to run Dijkstra’s algorithm on a graph whose edge weights are integers in the range 0, 1, . . . , W, where W is a relatively small number.
(a) Show how Dijkstra’s algorithm can be made to run in time O (W|V | + |E |).
(b) Show an alternative implementation that takes time just O ((|V | + |E |) log W).
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.