(related to Algorithm: Get All Components of a Graph)
The time complexity of the corresponding algorithm \(\mathtt{getCOMPONENT(G,v,m)}\) obtaining the component induced by vertices connected to a biven vertex \(v\) is \(\mathcal O(|V|+|E|)\).
The fact that \(\mathtt{getCOMPONENT(G)}\) calls the algorithm \(\mathtt{getCOMPONENT(G,v,m)}\) inside an additional for-next loop in the lines \(6\) to \(12\) has no impact on this time complexity, since both algorithms make use of the same \(visited\) property of the vertices in the graph.