MCPcopy Index your code
hub / github.com/BeeBombshell/Python-DSA / removeTail

Method removeTail

DSA/SinglyLinkedList.py:77–85  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

75
76 #method to remove the tail
77 def removeTail(self):
78 if self.isEmpty():
79 return
80 temp = self.head
81 while (temp != None) and (temp.next != self.tail):
82 temp = temp.next
83 self.tail = temp
84 self.tail.next = None
85 temp = None
86
87 #method to delete a specific element
88 def delete(self, v):

Callers 1

Calls 1

isEmptyMethod · 0.95

Tested by

no test coverage detected