You are viewing a single comment's thread. Return to all comments →
full answer
class Node: def __init__(self,data): self.data=data self.next=None class SinglyLinkedList: def __init__(self): self.head=None def insertNodeAtTail(head, data): node = Node(data) if head==None: head=node else: cur=head while cur.next: cur=cur.next cur.next=node return head
Seems like cookies are disabled on this browser, please enable them to open this website
Insert a Node at the Tail of a Linked List
You are viewing a single comment's thread. Return to all comments →
full answer