diff --git a/data_structures/linked_list/singularly_linked_list/linked_list_deletion.py b/data_structures/linked_list/singularly_linked_list/linked_list_deletion.py index 5cb25aa..5061a2d 100644 --- a/data_structures/linked_list/singularly_linked_list/linked_list_deletion.py +++ b/data_structures/linked_list/singularly_linked_list/linked_list_deletion.py @@ -74,7 +74,7 @@ def delete_node_at_pos(self, pos): return prev = None - count = 1 + count = 0 while cur_node and count != pos: prev = cur_node cur_node = cur_node.next