The most efficient algorithm for finding the number of connected components in an undirected graph on n vertices and m edges has time complexity.

A) \theta(n)

B) \theta(m)

C) \theta(m + n)

D) \theta(mn)

# Undirected graph

**Shreya1**#1

A) \theta(n)

B) \theta(m)

C) \theta(m + n)

D) \theta(mn)