It ensures finding the shortest path by maintaining a _______ that contains the shortest distance to each node from the source.

  • Binary Tree
  • Linked List
  • Priority Queue
  • Stack
It ensures finding the shortest path by maintaining a priority queue that contains the shortest distance to each node from the source. The priority queue helps prioritize nodes based on their distance values, facilitating efficient path exploration.
Add your answer
Loading...

Leave a comment

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