问题 单项选择题

设有关键码序列(14,12,5,6,8,10,15,19,47,11,2,9),要按关键码值递增的次序排序,采用直接选择排序法,一趟扫描后的结果为

A.(2,5,12,14,6,8,10,15,19,47,11,9)

B.(2,12,5,6,8,10,15,19,47,11,14,9)

C.(14,12,5,6,8,10,15,19,47,11,2,9)

D.(5,6,8,10,15,19,47,11,2,9,14,12)

答案

参考答案:B

解析: 直接选择排序是对文件进行n-1趟扫描,第i趟扫描从剩下的n- i+1个记录中选出关键码值最小的记录与第i个记录进行交换,直到全部排完。按照这一思想,对关键码序列(14,12,5,6,8,10,15,19,47,11,2,9)进行第一趟排序。首先选出关键码值最小的为2.然后将2与第一个关键码值14进行交换位置,关键码值序列变为 (2,12,5,6,8,10,15,19,47,11,14,9)。

阅读理解
阅读下列材料,从所给的A、B、C、D四个选项中选出符合1-4小题要求的最佳选项。
     Tom, Eric, Tess and Ann are talking about in what way they would like their schools improved.
Read the following descriptions (A, B, C and D) and match them with the four opinions marked 1-4.
( )1. Tom: I'd like somewhere to sit and read and enjoy myself.
( )2. Eric: I hope our school can be more comfortable and convenient.
( )3. Tess: I really prefer to have a place to do some exercise after class.
( )4. Ann: I think our school should buy more equipment like computers.
                              A
     Our school is big with nice modern
buildings and everything, but there is one
thing I would really love-a gym. We're
right in the middle of a big city and the
traffic is very busy, so I find it very difficult
 to get out to the gym at lunchtime, A gym
would be good for the school. If more
people went to the gym and did some
exercise, they'd probably work better!
                                 B
     What I'd most like to have is a little
cafe, where we students can rest and do some
reading. At the moment people have to stand
in the passage, or even outside and there's
nowhere to buy a drink or something, or read
the paper, so people don't stay in school for
long after the lessons finish. I think it would
be completely different if they had somewhere to
enjoy themselves.
                              C
     Our school has a nice building, and is
in a nice part of the city. Unfortunately we
haven't got much equipment, so I'd really
like to have a computer room with the
Internet available. I think students can
learn a lot this way. And I'd like to have
VCDs in every classroom instead of tapes.
VCDs are so much more interesting for
learning a language, I think.
                                 D
     Our school is just uncomfortable in every
way. For example, the chairs are really
uncomfortable, so the next thing I'd like to
do is get some comfortable chairs of good
quality. Oh, and the worst thing is that
we're on the fifth and sixth floors of our
building, so I'd love to have some lifts put
in. Just one little lift would make our lives so
much easier!
单项选择题