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