Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Yes I found my error. It was a small one.

    @g964 Just because people solved it in the same language it doesnt mean there are no issues. Maybe Iam the only one with that approack unlikely but no impossible. I really dont know why you are instantly taking about wasting time. Everybody does these mistakes even you.

  • Custom User Avatar

    I tried your code; I get:

    Fixed_Tests
    Caught std::exception, what(): vector::_M_range_check: __n (which is 1) >= this->size() (which is 0)
    

    Note there are more fixed tests when you "Attempt".

    Is there some sort of mistake in the tests here

    No. Look at the top of the page: 2719 people passed the C++ kata. Before posting issues look how many people passed the kata in your language. If there were errors somebody would have seen them before you... and you would avoid to make people waste their time:-)
    Reading this: "https://docs.codewars.com/training/troubleshooting could help you.
    Good luck!

  • Custom User Avatar

    Your code seems to pass now. Did you find your mistake?

  • Custom User Avatar

    What language?

  • Custom User Avatar

    When I "test" my code the fixed tests are passed. But if I "attempt" my code, the fixed tests fail but the random tests pass. Dafuq? Is there some sort of mistake in the tests here, because my code works perfectly fine.

  • Custom User Avatar

    Your function gets the start node of a long chain of nodes. But somewhere this chain starts to loop. You should count and return the numbers of nodes that create the loop.