At map<T, int> visited. this is a map right. Where would the visited[src]] considered as true and marked?

would the visited[src} mark true in T? Or how does it operate here? can someone explain?

Hey @JaveedYara
map<T,int> visited;
This is a map with key of datatype T and value of datatype int

Also ,in C/C++ true==1 and false==0

Now ask what you didn’t understood :slight_smile:

is this map making a Pair of data type T, and and int?

bro map makess a key value relationship

so key is of type T and value is of type int

map<T,pair<int,string>> temp;
here key is of type T and value is of type pair<int,int>

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.