MCPcopy Create free account
hub / github.com/geekcomputers/Python / insert

Method insert

Sorting Algorithims/quicksort_linkedlist.py:21–24  ·  view source on GitHub ↗
(self, new_data: int)

Source from the content-addressed store, hash-verified

19
20 # method to insert nodes at the start of linkedlist
21 def insert(self, new_data: int) -> None:
22 new_node = Node(new_data)
23 new_node.next = self.head
24 self.head = new_node
25
26 # method to print the linkedlist
27 def printLL(self) -> None:

Callers 1

Calls 1

NodeClass · 0.70

Tested by

no test coverage detected