数据结构与算法课后题整理(四)

1.(2分)具有10个叶结点的二叉树中有( )个度为2的结点。

A.9
B.10
C.8
D.11

2.(2分)一棵完全二叉树上有1001个结点,其中叶子结点的个数是( ) 。

A.250
B.501
C.505
D.254

3.一棵二叉树高度为h(只有根结点时的高度为1),所有结点的度或为0,或为2,则这棵二叉树最少有( )个结点。

A.2h
B.h+1
C.2h+1
D.2h-1

4.高度为 K(只有根结点时的高度为1)的二叉树最大的结点数为( ) 。
得分/总分

A.2^(k-1)
B.2^k
C.(2^k)-1
D.2^(k-1)-1

5.一个具有1025个结点的二叉树的高h(只有根结点时的高度为1)为 ( )。

A.10到1024之间
B.11
C.11到1025之间
D.10

6.A complete binary tree of height “k”(the height is 1 when only the root in the tree) contains( )nodes at least.

A.2^(k-1)
B.2^(k-1)-1
C.2^k
D.2^k-1

7.A full binary tree with 2n+1 nodes contains .

A.n non-leaf nodes
B.n leaf nodes
C.n-1 non-leaf nodes
D.n-1 leaf nodes

8.A full binary tree with n leaves contains nodes.

A.n
B.
在这里插入图片描述
C.2n-1
D.2^n

9.A binary tree of depth “d” is an almost complete binary tree if ____ .

A.Both (i) & (ii)
B.None of them
C.(ii) For any node “n” in the tree with a right descendent at level “d” all the left descendents of “n” that are leaves, are also at level “d”
D.(i) Each leaf in the tree is either at level “d” or at level “d–1”

10.二叉树的第k(只有根结点时的层数为1)层上最多含有结点数为 ___。

A.2^(k-1)

B.2^k

C.2^(k-1)-1

D.(2^k)-1

11.若一棵二叉树具有10个度为2的结点,5个度为1的结点,则度为0的结点个数是____ 。

A.11
B.9
C.15
D.不确定

12.The number of leaf nodes in a full binary tree of depth d is _____ .

A.2^(d+1)+1
B.2^(d-1)+1
C.2^d+1
D.2^d

13.由3个结点所构成的二叉树有 _______种形态 (5)

14.一棵深度为6的满二叉树有_______个分支结点(63)

15.设一棵完全二叉树具有1000个结点则此完全二叉树有_____个度为2的结点。(499)

  • 5
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值