问题 填空题

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

答案

参考答案:C

解析: 堆排序是完全二叉树的一个重要应用,可以解释为完全二叉树中的任一节点的关键码都小于或等于它的两个子女的关键码。排序的基本思想是:对一组待排序的关键码首先把他们按照堆的定义排成一个序列(建堆),取出最小关键码,余下的关键码再建堆,再取出最小关键码,如此反复,直到全部关键码排序完毕。本题的解答步骤为:第一次:18,30,5,10,46,38, 35,40。第二次:18,10,5,30,46,38,35,40。第三次:5, 10,18,30,46,38,35,40。3次以后就可以了。

完形填空

Professional sports are very popular in the United States and they are big business. The most popular sports are basketball, football and baseball. ___1___ has its own season. And ___2___ supporters. Professional teams are named for the cities ___3___ they are located. When a team plays in a championship game, most people in the city ___4___ the game with interest and enthusiasm. Basketball is ___5___ around the world. Professional basketball games in the US ___6___ indoors during winter months. From November to April ___7___ can find a professional basketball game several nights a week in most large ___8___ cities. Basketball is an American sport. It ___9___ the national pastime.

The game is played in the evening ___10___ every night of the week and ___11___ weekends as well. The season begins in April and ___12___ in the October. Football ___13___ most popular professional sport in the US. It is played on Sundays ___14___ the fall from August to January. American football is different ___15___ international football, ___16___ Americans called soccer. Both games require ___17___ and specialized skills. Professional players are very ___18___.The most famous players ___19___ millions of dollars for their playing skill. American best players have higher ___20___ than the country’s president.

1. A. Every     B. Both   C. Each   D. All

2. A. million   B. millions     C. million of   D. millions of

3. A. when      B. where C. who    D. whose

4. A. follow    B. walk   C. run     D. jump

5. A. well-known   B. well    C. known       D. fame

6. A. played    B. is played    C. plays   D. are played

7. A. somebody      B. one     C. anyone       D. everybody

8. A. America B. England     C. American   D. English

9. A. was called      B. has been called   C. is called     D. be called

10. A. nearly   B. close   C. closely       D. near

11. A. at  B. in       C. on      D. during

12. A. finish   B. finishing    C. finished      D. finishes

13. A. became B. is become   C. is becoming       D. has become

14. A. during  B. while  C. on      D. at

15. A. of B. from   C. with    D. about

16. A. when    B. that     C. where D. which

17. A. strong   B. strength    C. strengthen  D. stronger

18. A. well pay      B. good pay  C. well paid    D. good paid

19. A. make    B. had     C. got     D. received

20. A. money  B. salaries       C. pay     D. wage

单项选择题