Gate CS-2014-1 Question Paper With Solutions

Q. 21 Let G be a graph with n vertices and m edges. What is the tightest upper bound on the running time of Depth First Search on G, when G is represented as an adjacency matrix?

(A) O(n)

(B) O(m+n)

(C) O(n2)

(D) O(mn)

Answer: (C)

Explanation:

Gate CS-2014-1 Question Paper With Solutions

Learn More:   Gate ME-2017-2 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here