Shows answer as 1


this is my code.
i think the variable members is not incremented in dfs_helper function. how to resolve that?

@tanjuljain19
Small error
line 22
void dfs_helper(int src,map<int,bool> &visited,int &members)
you forgot to make members a reference variable

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.

https://ide.codingblocks.com/s/326538 . Shows TLE for 2 test cases and wrong answer for 1 test case