edited by
1,214 views
0 votes
0 votes

What will be the running-time of Dijkstra's single source shortest path algorithm, if the graph $G(V,E)$ is stored in the form of an adjacency list and binary heap is used?

  1. $O (\mid V \mid 2)$
  2. $O (\mid V \mid \log \mid V \mid)$
  3. $O ( ( \mid E \mid+\mid V \mid ) \log \mid V \mid )$
  4. $O( \log \mid V \mid )$
edited by

2 Answers

Best answer
0 votes
0 votes
The running time will be O ( ( |E|+|V| ) log |V|) when we use adjacency list and binary heap.
selected by
0 votes
0 votes

@Bikram sir, please help as we know Dijkstra's take O(ElogV) and as it is linklist  implentation it will be sparks graph  E is O(V) so answer should be O(Vlog V)

Answer:

Related questions

0 votes
0 votes
1 answer
1
Bikram asked May 26, 2017
487 views
The cost of optimal binary search tree for the identifier set $(a1, a2, a3) =$ (do, if, while) with $p(1) = 0.3, \ p(2) = 0.2, $ $p(3) = 0.15, q (0) = 0.05, q(1) = 0.15...
2 votes
2 votes
2 answers
3
Bikram asked May 26, 2017
373 views
Assume Dijkstra's Algorithm is used to find the shortest paths from node G in the above graph. The total number of edges which are not included in any of the shortest pat...
1 votes
1 votes
2 answers
4
Bikram asked May 26, 2017
493 views
The total number of LCS (Longest Common Subsequences) of $P = abcd123$ and $Q= badc321$ that can be formed are ______.