We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ea60df commit d8d6633Copy full SHA for d8d6633
docs/14_树与二叉树/btree.py
@@ -73,7 +73,7 @@ def preorder_trav_use_stack(self, subtree):
73
s.push(subtree)
74
while not s.empty():
75
peek = s.pop()
76
- print(peek.data)
+ print(peek.data) # 注意这里我用了 print,你可以用 yield 产出值然后在调用的地方转成 list
77
if subtree.left:
78
s.push(subtree.left)
79
if subtree.right:
0 commit comments