The most efficient algorithm for finding the number of connected components in an undirected graph on n vertices and m edges has time complexity.
theta(n)
theta(m)
theta(m + n)
theta(mn)
This question is part of this quiz :
Top MCQs on Graph Data Strcuture with Answers