Vidyalelo
Data Structure · Q2

Graphs

Programming · Data Structure · question 2

Q2

What is the time complexity of performing a depth-first search (DFS) on a graph using an adjacency matrix?

A.
O(V log V)
B.
O(E)
C.
O(V2)
Answer
D.
O(V + E)

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board