Before adding a new edge ,we need to check if that edge forms a cycle because , if by adding an edge cycle forms then the nodes that we are trying to connect already has a path between them in some other way, so there this no need to add that edge. Hope it's clear
your explaination in D is so amazing
Hungry sid man your explanation is at god level. But the cycle part i didnt understand much but others are at peak level
Before adding a new edge ,we need to check if that edge forms a cycle because , if by adding an edge cycle forms then the nodes that we are trying to connect already has a path between them in some other way, so there this no need to add that edge.
Hope it's clear