Question 91
Explanation
When using Dijkstra's algorithm to find shortest path in a graph. which of the following statement is not true?
Answer : (3) Shortest path always passes through least number of vertices Explanation
Previous | Next |
UGC NET CS December 2019 - Question 90 | UGC NET CS December 2019 - Question 92 |
Option (2) : TRUE : Every time a new node is visited, we choose the node with the smallest known distance/cost (weight) to visit first
Option (3) : FALSE : It is false because Shortest path can have any number of vertices.
Option (4) : TRUE : Dijkstra's algorithm will support only positive weight edges.
So, option 3 is correct answer
Reference : Dijkstra's algorithm (Dijkstra's Shortest Path First algorithm)