• + 0 comments

    Python 3 Solution; def insert(self,head,data): new_node = Node(data) if head is None: head = new_node else: current = head while current.next: current = current.next current.next = new_node return head