Question: What is the time complexity of depth-first search (DFS) on a graph?
Options:
Correct Answer: O(V + E)
Solution:
DFS explores all vertices (V) and edges (E) in the graph, leading to a time complexity of O(V + E).