Doubt in lecture

I know the use of visited map but I think in this node we don’t need this visited map as we are not using it for any significant purpose…
If you find any significant usage of visited map in this code…please explain here


screenshot of code given in lecture by prateek sir

actually, you are correct, there is not much significance of the visited map here

thank you for clearing it