Skip to content

Instantly share code, notes, and snippets.

@neonbadger
Last active March 21, 2016 03:05
Show Gist options
  • Save neonbadger/eba93fd2f12b36d95297 to your computer and use it in GitHub Desktop.
Save neonbadger/eba93fd2f12b36d95297 to your computer and use it in GitHub Desktop.
"""
Hackerrank solution.
Print linked list in reverse.
"""
def ReversePrint(head):
print_list = []
curr = head
while curr is not None:
print_list.append(curr.data)
curr = curr.next
for i in reversed(print_list):
print i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment