MCPcopy Index your code
hub / github.com/geekcomputers/Python / delete_end

Method delete_end

singly_linked_list.py:63–72  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

61 del temp
62
63 def delete_end(self):
64 curr = self.head
65 prev = None
66 while True:
67 if curr.next == None:
68 prev.next = None
69 del curr
70 break
71 prev = curr
72 curr = curr.next
73
74 def delete(self, pos):
75 if pos < 0 or pos > self.length():

Callers 1

deleteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected