Pairing in Graph

https://ide.codingblocks.com/s/65090

Wrong Answer

Please Reply…

Hi Monika, pls share the link of question in which you have doubt.

https://online.codingblocks.com/player/16682/content/5256?s=3971

HI Monika, what happens if you get a graph which is fully connected i.e. it’s ans needs to be 0. Your code instead gives a non-zero ans, to be preceise where the ans is 0 your code gives the no. of nodes as the answer. Please rectify this bug and then try again.
Hope this helps :slight_smile:

1 Like

Ok Bhaiya I will check.

Awesome explanation!!