Bipartite Graph check

while checking for Bipartite Graph …if we get any node already visited then why we check whether its parent of current node or not…is it must to check and why…??

hello @anuranjan8319918906

yeah it is must, while running dfs we have come to child from parent node only that is why we dont want to go back to parent again(or to check its color it is understood that parent will have different color then child). we need to check only for those neigbours which are visited but they are not parent