Skip to content

Instantly share code, notes, and snippets.

@alexnikol

alexnikol/.py

Created Aug 10, 2020
Embed
What would you like to do?
Insert a Node at the Tail of a Linked List. Testing
# RESULT
node1 = SinglyLinkedListNode(1)
node2 = SinglyLinkedListNode(2)
node3 = SinglyLinkedListNode(3)
node1.next = node2
node2.next = node3
result = insertNodeAtTail(node1, 34)
current_node = result
while current_node is not None:
print(current_node.data)
current_node = current_node.next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.