数据结构英文习题解析-第六章 堆和二叉树Heap, Priority Queues, Binary Tree

前言:最近快到FDS考试了,po重刷了一下学校的题目,自己整理了一些解析orz 因为po在自己找解析和学习的过程中非常痛苦,所以在此共享一下我的题目和自己写的解题思路,欢迎各位指出错误~全章节预计会陆续更新,可在专栏查看~

HW6

1. If a complete binary tree with 137 nodes is stored in an array (root at position 1), then the nodes at positions 128 and 137 are at the same level.

True 以根为position1开始往后算

2. The inorder traversal sequence of any min-heap must be in sorted order.

False 最小堆本身并不是像二叉搜索树那样有序的,所以中序遍历最小堆也不能保证得到有序序列。

3. In a max-heap with n (>1) elements, the array index of the minimum key may be __.

A.1

B.⌊n/2⌋−1

C.⌊n/2⌋

D.⌊n/2⌋+2

D;因为D是一个叶结点,ABC都不是叶结点,不可能是最小的

4.  Using the linear algorithm to build a min-heap from the sequence {15, 26, 32, 8, 7, 20, 12, 13, 5, 19}, and then insert 6. Which one of the following statements is FALSE?  

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值