Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
def insert_at_end(head, data):
new_node = Node(data)
current = head
while # traversing till the last node
current =
# change the next of last node = new_node
return head
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment