Let \(G\) be a graph with \(n\) vertices and \(m\) edges. What is the tightest…

GATE · 2014 · CS · Set 1 · Computer Science & IT

Let GG be a graph with nn vertices and mm edges. What is the tightest upper bound on the running time of Depth First Search on GG, when GG is represented as an adjacency matrix?

  1. A.

    θ(n)\theta (n)

  2. B.

    θ(n+m)\theta (n + m)

  3. C.

    θ(n2)\theta (n^2)

  4. D.

    θ(m2)\theta (m^2)

Attempted by 873 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…