Skip to content

Instantly share code, notes, and snippets.

@alexnikol
Last active Aug 9, 2020
Embed
What would you like to do?
Print the Elements of a Linked List HackerRank Exercise. Realization
from linked_list import SinglyLinkedListNode
def printLinkedList(head):
currentNode = head
while currentNode is not None:
print(currentNode.data)
currentNode = currentNode.next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment