You are viewing a single comment's thread. Return to all comments →
python3
class Node: def __init__(self,data): self.data=data self.next=None class SinglyLinkedList: def __init__(self): self.head=None def insert_node(self,data): node=Node(data) node.next=self.head self.head=node def reversePrint(head): current=head while current: print(current.data) current=current.next
Seems like cookies are disabled on this browser, please enable them to open this website
Print in Reverse
You are viewing a single comment's thread. Return to all comments →
python3