Graph Breadth first search

visited[src]=true;
How this line work please explain ??
I understand littlebit that we have created a map<T,int> visited; but it’s type here is int
so we are declaring
Let visited[0] = true;
why true and not a number ?

@ashwani225 int 0 translates to boolean false
any other int translates to boolean true

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.