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

Method Insert_At_Beginning

Rotate_Linked_List.py:11–17  ·  view source on GitHub ↗
(self, new_data)

Source from the content-addressed store, hash-verified

9 self.head = None
10
11 def Insert_At_Beginning(self, new_data):
12 new_node = Node(new_data)
13 if self.head is None:
14 self.head = new_node
15 return
16 new_node.next = self.head
17 self.head = new_node
18
19 def Rotation(self, key):
20 if key == 0:

Callers 1

Calls 1

NodeClass · 0.70

Tested by

no test coverage detected