The most efficient algorithm for finding the number of connected components in a $n$ undirected graph on $n$ vertices and $m$ edges has time complexity
option C
Θ(m+n)when BFS and DFS is implemented using adjacency list, else it is Θ(n^2) when implemented using adjacency matrix.
for explanation refer the link
https://gateoverflow.in/405/gate2008-7
64.3k questions
77.9k answers
244k comments
80.0k users