前言:最近快到FDS考试了,po重刷了一下学校的题目,自己整理了一些解析orz 因为po在自己找解析和学习的过程中非常痛苦,所以在此共享一下我的题目和自己写的解题思路,欢迎各位指出错误~全章节预计会陆续更新,可在专栏查看~
HW5
1.In a binary search tree, the keys on the same level from left to right must be in sorted (non-decreasing) order.
T
2.In a binary search tree which contains several integer keys including 4, 5, and 6, if 4 and 6 are on the same level, then 5 must be their parent.
F;4和6可能不是同一个parent的两个child,可能4是rchild,6是lchild
3. Given a binary search tree as shown in the following figure. Which of the following relationships is correct with respect to the given tree?

1<3<5<4<2;遵循左子树小,右子树大的原则

最低0.47元/天 解锁文章
2186

被折叠的 条评论
为什么被折叠?



