Print the Elements of a Linked List

  • + 0 comments

    Here is my simple python solution:

    def printLinkedList(head):
        print(head.data)
        if head.next is not None:
            printLinkedList(head.next)