aman_naughty's blog

By aman_naughty, history, 6 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?
»
6 years ago, # |
  Vote: I like it -8 Vote: I do not like it

why down-voting

  • »
    »
    6 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).