Skip to content

Instantly share code, notes, and snippets.

Last active Aug 10, 2020
What would you like to do?
Insert a Node at the Tail of a Linked List. Realization
from linked_list import SinglyLinkedListNode
def insertNodeAtTail(head, data):
if head is None:
return SinglyLinkedListNode(data)
current_node = head
while is not None:
current_node = = SinglyLinkedListNode(data)
return head
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment