Question: What is the time complexity of a breadth-first search (BFS) on a graph?
Options:
Correct Answer: O(V + E)
Solution:
BFS visits each vertex and edge once, resulting in a time complexity of O(V + E).