Error in DFS Connected components

make the dfs call without any paramter since we are required to traverse the entire adjList once
initiliase the component variable as a instance variable & not as local variable ( initliase to 0 )
line 37 of the code T i should be auto i since auto will be of the form map<T, list>

i have updated the code please have a look

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.