问题 单项选择题

对于长度为 n 的线性表,在最坏情况下,下列各排序法所对应的比较次数中正确的是______。

A.冒泡排序为 n/2

B.冒泡排序为 n

C.快速排序为 n

D.快速排序为 n(n-1)/2

答案

参考答案:D

解析:假设线性表的长度为 n,则在最坏情况下,冒泡排序需要经过 n/2 遍的从前往后扫描和 n/2 遍的从后 往前扫描,需要比较次数为 n(n-1)/2。快速排序法的最坏情况比较次数也是 n(n-1)/2。

阅读理解

阅读理解。

     Radio and television are very popular in the world today. Many people watch TV. We call them viewers.

Perhaps more people listen to the radios. We call them listeners. Older people call the radio the wireless (无

线电). And in conversation people call television TV or the "tele".

     The TV is, of course, more useful than the radio. On the TV you can see and hear what is happening. But

the radio is not disappearing. It's still with us. And the number of listeners is becoming larger. One reason for

this is that the invention of the transistor set (晶体管收音机) is sometimes very small. It's easy to carry. You

can put one in your pocket when you go to work. You can listen to the news broadcasts or radio lessons on

the bus. You can listen to them on your bike. You can put your own transistor set beside your pillow when

you go to bed. Besides radio broadcasts are better for blind people. And many old people's eyes are not good

enough to watch TV. When people are working, they can not watch TV. But they can always listen to music

on the radio. What's more, a TV set is usually more expensive than a transistor set.

1. Older people call the radio _____.

A. viewers

B. listeners

C. the wireless

D. the tele 

2. Tile TV is more _____ than the radio.

A. beautiful

B. useful

C. expensive

D. B and C

3. On TV, a viewer can _____ what is happening.

A. see

B. hear

C. talk

D. A and B

4. One reason for the number of listeners becoming larger is _____.

A. people don't like TV as much as they did

B. the invention of the transistor set

C. people love radios better than TV sets

D. people love radio programmes better

5. Radio broadcasts are better for _____.

A. blind people

B. younger children

C. some old people

D. A and C

单项选择题