问题 填空题

对于关键码序列18,30,35,10,46,38,5,40进行堆排序(假定堆的根结点为最小关键码),在初始建堆过程中需进行的关键码交换次数为 【5】

答案

参考答案:C

解析: 根据采用筛分的方法建堆的方法如下,首先将所有要排序的关键码放在一棵完全二叉树的各结点上,然后从i[n/2]的结点Ki开始,逐步把以K[n/2]-1、K[n/2]- 2…Kn为根的子树排为堆,直到以K1为根的子树排成堆,就完成了建堆过程。按照上述过程写出完全二又树,排序后发现需进行的关键码交换次数为3次。

选择题
阅读理解

根据短文内容,从短文后的选项中选出能填入空白处的最佳选项。选项中有两项为多余选项。

                                                                   1______

     Home can be a great place for children to study. It's important to provide a workspace of their own where

they can read books or just write a letter to their friends.

     ● Location (位置) 

     2______ Kitchen and dining room are not so well suite for regular study. since books and pens get in the

way of the day-to-day uses of those areas. Set up a place where a child can settle in and leave papers and pens

at band without having to clear everything away each night. For a child that likes being alone, set aside a corner

of his bedroom, but keep it separate from things like games, music and other hobbies not related to studying.

     ● Keeping Things in Order

     Parents should encourage their child to spread out, but to leave it neat and orderly when he isn't using his

workspace. Ownership is very important for self-respect 3______ The workplace should be personal, but not

another part of the playroom.

     ● 4______ 

     Encourage the whole family to help build a supportive environment that children need for success in school.

Give them a good example of how to deal with problems, how to manage time and get things done in the right

way. 5______ Study will be more enjoyable and effective when supported by the whole family.