问题 单项选择题

下列排序方法中,最坏情况下比较次数最少的是______。

A.冒泡排序

B.简单选择排序

C.直接插入排序

D.堆排序

答案

参考答案:D

解析: 考查各种排序方法的时间复杂度,冒泡排序、简单选择排序、直接插入排序在最坏的情况下比较次数都是O(n2)的,而堆排序的时间复杂度为O(nlog2n),这也是堆排序的最大优点。

阅读理解

The office has always been a place to get ahead. Unfortunately, It is also a place where a lot of natural resources start to fall behind. Take a look around next time you’re at work. See how many lights are left on when people leave. See how much paper is being wasted. How much electricity is being used to run computers that are left on. Look at how much water is being wasted in the rest-rooms. And how much solid waste is being thrown out in the rubbish cans. We bet it’s a lot.

Now, here are some simple ways you can produce less waste at work. When you are at the copier, only make the copies you need. Use both sides of the paper when writing something less important. Turn off your lights when you leave. Use a lower watt bulb in your lamp. Drink your coffee or tea out of your mugs instead of single-use cups. Set up a recycling box for cans and one for bottles. And when you’re in the bathroom brushing your teeth or washing your face, don’t let the tap run. Remember, if we use fewer resources today, we’ll save more for tomorrow.

小题1:The main purpose of the passage is to tell people _______.

A.the disadvantages of working in an office

B.the waste produced in an office

C.to save resources when working in an office

D.how to save water in a restroom小题2:How many kinds of waste are mentioned in the passage?

A.Two.

B.Three.

C.Four.

D.Five.小题3:From the passage we can infer that in the office ________.

A.using computers is a waste of resource

B.many people don’t turn off the computers after using them

C.computers are run by electricity

D.a computer is not a must for working小题4:It is suggested that we use both sides of the paper at the copier because _______.

A.we are short of paper

B.the printing is not important

C.we should save paper

D.we have to pay for the paper小题5:The underlined word mugs is most likely to be _______.

A.a machine that makes coffee

B.a container that can be used again and again

C.a paper product for tea

D.something that can only be found in an office

单项选择题