Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE CS Mock 2018 | Set 2 | Question 22

  • Last Updated : 08 Mar, 2018

Which of following option is not correct regarding depth first searching?

(A) In a depth-first traversal of a graph G with V vertices, E edges are marked as tree edges. The number of connected components in G is (E – V).
(B) Depth-first search requires O(V^2) time if implemented with an adjacency matrix.
(C) Depth-first search requires O(V + E) time if implemented with adjacency lists
(D) None of these


Answer: (A)

Explanation: In a depth-first traversal of a graph G with V vertices, E edges are marked as tree edges. The number of connected components in G is (V – E).
Only option (A) is false.

Quiz of this Question

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :