Q. What is the running time of Bellmann Ford Algorithm?

  • (A) o(v)
  • (B) o(v2)
  • (C) o(elogv)
  • (D) o(ve)
πŸ’¬ Discuss
βœ… Correct Answer: (D) o(ve)
Explanation: bellmann ford algorithm runs in time o(ve), since the initialization takes o(v) for each of v-1 passes and the for loop in the algorithm takes o(e) time. hence the total time taken by the algorithm is o(ve).

Explanation by: Mr. Dubey
bellmann ford algorithm runs in time o(ve), since the initialization takes o(v) for each of v-1 passes and the for loop in the algorithm takes o(e) time. hence the total time taken by the algorithm is o(ve).

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
581
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
85%
Success Rate