edited by
465 views
5 votes
5 votes

Which of the following is/are correct with respect to Dijkstra's algorithm to find Single Source Shortest Path in a weighted directed graph $G$? (Mark all the appropriate choices)

  1. Dijkstra's algorithm runs in $O(|E| \lg |V|)$ if priority queue is implemented with a binary min-heap
  2. For dense graphs $(|E| = \Omega(|V|^2))$ Dijkstra's algorithm performs better if priority queue is implemented with an array
  3. Dijkstra's algorithm has a worst case time complexity of $O(|V|^2)$
  4. Dijkstra's algorithm has a worst case time complexity of $O(|V|\lg |V| + |E|)$ when implemented with a Fibonacci heap
edited by

1 Answer

2 votes
2 votes
All the given statements are correct.

When nothing is mentioned about the data structure to be used we can assume the best possible data structure.
edited by
1 flag:
✌ Edit necessary (Arjun)
Answer:

Related questions

4 votes
4 votes
1 answer
2