Блог пользователя aman_naughty

Автор aman_naughty, история, 5 лет назад, По-английски

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
  • Проголосовать: нравится
  • -35
  • Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится -8 Проголосовать: не нравится

why down-voting

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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).