Пример #1
0
	def insertAfter(self, p, value):
		node = ListNode(value)
		node.setPointerTo(p.ptr)
		p.setPointerTo(node)
Пример #2
0
	def unshift(self, value):
		node = ListNode(value)
		if self.lst != None:
			node.setPointerTo(self.lst)
		self.lst = node
Пример #3
0
 def insertAfter(self, value, p):
     node = ListNode(value)
     node.setPointerTo(p.ptr)
     p.setPointerTo(node)
     return node