Code of cycle detection using BFS in undirected graph

in the code prateek bhaiya has written a condition :
parent[node]!=neighbour but i think the condition should be
parent[neighbour]!=node

can you please share link of code? or post screenshot of code

Hey Prakhar, as you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.