Which algorithm is used to find the shortest path in a graph?

  • ADecision Tree
  • BDijkstra's Algorithm
  • CK-Nearest Neighbors
  • DNone of these
Show answerHide answer

Correct answer B

Dijkstra's Algorithm is used to find the shortest path between nodes in a graph, especially for weighted graphs. It works by iteratively selecting the closest unvisited node and updating the shortest path estimates.