Skip to content

Commit

Permalink
fix: problems in 06_linkedlist/singlyLinkedList.py
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed Aug 27, 2019
1 parent 1556c4a commit 7779103
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/06_linkedlist/singlyLinkedList.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def delete_by_node(self, node):
not_found = False # 如果在整个链表中都没有找到指定删除的Node节点,则该标记量设置为True
while pro.next != node:
if pro.next == None: # 如果已经到链表的最后一个节点,则表明该链表中没有找到指定删除的Node节点
not_found == True
not_found = True
break
else:
pro = pro.next
Expand All @@ -169,7 +169,7 @@ def delete_by_value(self, value):
not_found = False
while node.data != value:
if node.next == None: # 如果已经到链表的最后一个节点,则表明该链表中没有找到执行Value值的Node节点
not_found == True
not_found = True
break
else:
pro = node
Expand Down

0 comments on commit 7779103

Please sign in to comment.