What is the time complexity of Dijkstra's algorithm when implemented with a binary heap?

  • O(V log V + E log V)
  • O(V log V)
  • O(V^2 log V)
  • O(V^2)
When Dijkstra's algorithm is implemented with a binary heap, the time complexity becomes O(V log V), where 'V' is the number of vertices and 'E' is the number of edges in the graph. The binary heap efficiently supports the extraction of the minimum distance vertex in each iteration.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *