×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

What is the time complexity of Breadth-First Search (BFS) in a graph with 𝑉V vertices and EE edges?

17. What is the time complexity of Breadth-First Search (BFS) in a graph with 𝑉V vertices and EE edges?

  1. O(V^2)
  2. O(E + V)
  3. O(V + E)
  4. O(E * V)

Answer

The correct answer is: C) O(V + E)

Explanation

The time complexity of BFS is O(V + E) because it visits each vertex and each edge once.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.