Using BFS or DFS on a graph stored as adjacency lists, what is the tight…

PYQ CoCubes 2025

Using BFS or DFS on a graph stored as adjacency lists, what is the tight worst-case time complexity, expressed in terms of V vertices and E edges, for searching for a vertex?

  1. A.

    O(V + E)

  2. B.

    O(log V)

  3. C.

    O(V2)

  4. D.

    O(E log V)

Attempted by 401 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…