5 kyu

Cycle Detection: Floyd's The Tortoise and the The Hare

181 of 256user3482173
Description
Loading description...
Mathematics
Algorithms
  • Please sign in or sign up to leave a comment.
  • saudiGuy Avatar

    Python: Needs random tests.

  • saudiGuy Avatar

    python new test framework is required. updated in this fork

  • benjaminzwhite Avatar

    This comment has been hidden.

  • ejini战神 Avatar
    • Python new test framework should be used (Refer this & this for more detail)

    • Ruby 3.0 should be enabled (Refer this & this for more detail)

  • akar-0 Avatar

    The link to the other kata at the end of the description is broken and should redirect here

  • marcobrx Avatar

    A good kata with a bearly understandable description. Like others said here, read the Wikipedia page before you start coding.

  • G_kuldeep Avatar

    Fun fun :)

  • scrampin Avatar

    I really liked this challenge, but I agree with the below that the explanation is unecessarily complicated. I recommend that the user is simply pointed to the cycle detection page on Wikipedia to understand the concepts involved before coming back to complete the challenge (either that, or include more diagrams in the instructions themselves to make them clearer).

    Anyhow, the bulk of the challenge here is just understanding what's going on, and not in the coding itself. As a coding problem I'd probably give it a 6 kyu with the caveat that the user has taken the time to digest the maths.

  • Austin Haws Avatar

    I got hung up thinking mu was the value of the start but instead its the index of the start.

  • seanrich Avatar

    This is an interesting topic, but the explanation is unecessarily confusing. There are much simpler explanations of the three steps, but I would probably recommend this be a 4kyu kata.

  • cyrilcros Avatar

    My submissions are timing out unexpectedly. There is not really any reason why, the algo is really straightforward. Not a level 5 kyu in my mind, but a nice subject. Thanks for the kata

  • apendua Avatar

    This comment has been hidden.

  • Arheus Avatar

    Just one tiny typo : on the line where it says "and the hare by two (tortoise=f(f(tortoise)). " I think you meant "and the hare by two (hare=f(f(hare)). "

    Other than that, awesome series of katas, really refreshing (and you learn something new!), keep up the good work!