Computer Science Hard css fpsc

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

  • A Bubble Sort
  • B Dijkstra's Algorithm
  • C Binary Search
  • D Depth First Search
Correct Answer: Option B — Dijkstra's Algorithm
Explanation: Dijkstra's Algorithm finds shortest paths in weighted graphs with non-negative edge weights and is widely used in navigation systems.
Related MCQs