Skip to content

Instantly share code, notes, and snippets.

@alexnikol
Last active August 9, 2020 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexnikol/d473cb2cfcadfb4fc79065ef70902238 to your computer and use it in GitHub Desktop.
Save alexnikol/d473cb2cfcadfb4fc79065ef70902238 to your computer and use it in GitHub Desktop.
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