Ad
  • Default User Avatar

    It would eventually crash. Though, the problem desctiption states that there's always a loop, so I didn't include the null check in the while loop.

    BTW: I didn't know that solution passed... if was failing on the last test (but only here on codewars for some reason).

    EDIT: Please ignore my misplaced comment :)

  • Default User Avatar

    Thanks! I'll give it another go.

  • Custom User Avatar

    The C version of the kata seems to be OK.

    I think something is wrong with your solution.

  • Default User Avatar

    Something is wrong (C). I get correct values for FourNodesWithLoopSize3, NoTail and TinyLoop on my PC, but these tests fail here for some reason...