File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -264,9 +264,14 @@ class Queue(object): # 借助内置的 deque 我们可以迅速实现一个 Que
264
264
- 树的遍历我们用了 print,请你尝试换成一个 callback,这样就能自定义处理树节点的方式了。
265
265
- 请问树的遍历操作时间复杂度是多少?假设它的 size 是 n
266
266
- 你能用非递归的方式来实现树的遍历吗?我们知道计算机内部使用了 stack,如果我们自己模拟如何实现?请你尝试完成
267
- - 使用树的层序遍历我们能实现一个树的左右视图,比如从一个二叉树的左边能看到哪些节点。请你尝试做这个练习题 https://leetcode.com/problems/binary-tree-right-side-view/description/
268
267
269
268
270
269
# 延伸阅读
271
270
- 《Data Structures and Algorithms in Python》 13 章 Binary Trees
272
271
- [ https://www.geeksforgeeks.org/iterative-preorder-traversal/ ] ( https://www.geeksforgeeks.org/iterative-preorder-traversal/ )
272
+
273
+
274
+ # Leetcode
275
+
276
+ 使用树的层序遍历我们能实现一个树的左右视图,比如从一个二叉树的左边能看到哪些节点。
277
+ 请你尝试做这个练习题 https://leetcode.com/problems/binary-tree-right-side-view/description/
You can’t perform that action at this time.
0 commit comments