Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



When using Dijkstra's algorithm to find shortest path in a graph, which of the following statement is not true?





Solution

Dijkstra's algorithm finds the shortest path based on minimum total weight.

It does not necessarily choose the path with the least number of vertices.

A path with more vertices can have smaller total weight than a path with fewer vertices.

Dijkstra's algorithm also requires all edge weights to be non-negative.

So, the statement “Shortest path always passes through least number of vertices” is not true.



Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...