1 parent c01b5e8 commit ebb1a32Copy full SHA for ebb1a32
1 file changed
pygorithm/data_structures/linked_list.py
@@ -78,7 +78,7 @@ def insert_at_end(self, data):
78
def delete(self, data):
79
temp = self.head
80
# if data/key is found in head node itself
81
- if (temp.next is not None):
+ if (temp is not None):
82
if(temp.data == data):
83
self.head = temp.next
84
temp = None
0 commit comments