Insert a Node at the Tail of a Linked List

  • + 12 comments

    I have a recursive solution in Python if anyone is interested:

    def Insert(head, data):
        if head == None:
            return Node(data, None)
        else:
            if head.next == None:
                head.next = Node(data,None)
            else:
                Insert(head.next,data)
            return head