Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to add to end of linked list python

  def insert_at_end(self, data):
        new_node = Node(data)
        if self.start_node is None:
            self.start_node = new_node
            return
        n = self.start_node
        while n.ref is not None:
            n= n.ref
        n.ref = new_node;
Source by stackabuse.com #
 
PREVIOUS NEXT
Tagged: #add #linked #list #python
ADD COMMENT
Topic
Name
8+1 =