Skip to content

Commit e728f61

Browse files
committed
修改中序遍历中条件错误。
1 parent ca47c8f commit e728f61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,7 @@ class Node(object):
17051705
#中序遍历:遍历左子树,访问当前节点,遍历右子树
17061706

17071707
def mid_travelsal(root):
1708-
if root.left is None:
1708+
if root.left is not None:
17091709
mid_travelsal(root.left)
17101710
#访问当前节点
17111711
print(root.value)

0 commit comments

Comments
 (0)