• + 0 comments

    Iterative code in Python

    def reversePrint(head):
        x = head
        l = []
        if head is not None:
            while(x is not None):
                l.append(x.data)
                x = x.next
            print('\n'.join(map(str, l[::-1])))