aman_naughty's blog

By aman_naughty, history, 5 years ago, In English

Is this code to detect cycle in an undirected graph correct. I have run it on a few test cases and it seems good . Can someone from the community verify it.

code:

code
  • Vote: I like it
  • -35
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it -8 Vote: I do not like it

why down-voting

  • »
    »
    5 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Because your question is not precise. It's not a good way to ask the community to verify code for you, instead, it may be better to explain your approach in a few sentences or ask for some resources in this topic (of course after searching and not finding anything useful).