my code->
why its giving seg fault or something like that…??
its a simple dfs although in cout it shows correct order (see eg test case 2)
my code->
why its giving seg fault or something like that…??
its a simple dfs although in cout it shows correct order (see eg test case 2)
hello @hg11110000
for(auto x:m[src])
{
string temp=x;
m[src].erase(x);
dfs(temp);
}
here u r iterating and erasing at the same time. this may create an issue.
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.