Initial for each loop is not working in DFS and BFS

this loop is not working when I need to initially put false as the second value of the visited map.
for(int a:L)
{}
where L is of list* type;
but it’s working fine in your code.

@Varungautam
hello varun,
update ur ide and then try ,maybe that resolve this 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.