Ad
  • Custom User Avatar

    This list always contains a tail and a loop.
    ...in the following picture the tail's size is 3 and the loop size is 12:

    What exactly is a tail in the case of node == node.next, is there some 'tail' that points to a node that this functions starts with?
    Or are we always starting at the start of a linked list?.
    If so how many elements has a tail in the case of node == node.next and how many has a loop? Well from the solution the amount of elelemtns in this loop is 1, therefore tail has 0 elements, so is there always a so called tail?

    Also starting Node A (picture) is a head of a linked list so how it is a part of a 'tail' which from what I understand should refere to a end of a linked list (null, None etc.) in this case the linked list has no end- therefore there is no tail.

  • Custom User Avatar

    It doesn't matter for a solution, but the description might be misleading for a lot of people since in some cases node == node.next.

  • Custom User Avatar

    Most beautiful solution for a problem I have ever seen (46 katas so far).

  • Custom User Avatar

    Add this list to the test [2, -3, 3] as my first solution doesn't work for that yet I passed this Kata.