问题 单项选择题

在下列几种排序方法中,要求内存量最大的是

A.插入排序

B.选择排序

C.快速排序

D.归并排序

答案

参考答案:D

解析:【命题目的】要求考生对几种排序方法的实现机制有充分的理解。【解题要点】快速排序的基本思想是,通过一趟排序将待排序记录分割成独立的两部分,其中一部分记录的关键字均比另一部分记录的关键字小,再分别对这两部分记录继续进行排序,以达到整个序列有序;插入排序的基本操作是指将无序序列中的各元素依次插入到已经有序的线性表中,从而得到一个新的序列;选择排序的基本思想是:扫描整个线性表,从中选出最小的元素,将它交换到表的最前面(这是它应有的位置),然后对剩下的子表采用同样的方法,直到表空为止;归并排序是将两个或两个以上的有序表组合成一个新的有序表。【考点链接】各种排序方法实现过程及实现机制。

单项选择题
单项选择题

Suppose we built a robot to explore the planet Mars. We provide the robot with seeing detectors to keep it away from danger. It is powered entirely by the sun. Should we program the robot to be equally active at all times No, the robot would be using up energy at a time when it was not receiving any. So we would probably program it to stop its activity at night and to wake up at dawn the next morning.
According to evolutionary theory of sleep, evolution equipped us with a regular pattern of sleeping and waking for the same reason. The theory does not deny that sleep provides some important restorative functions. It merely says that evolution has programmed us to perform those functions at a time when activity would be inefficient and possibly dangerous. However, sleep protects us only from the sort of trouble we might walk into; it does not protect us from trouble that comes looking for us. So we sleep well when we are in a familiar, safe place, but we sleep lightly, if at all, when we fear that bears will nose into the tent.
The evolutionary theory explain the differences in sleep among creatures. Why do cats, for instance, sleep so much, while horses sleep so little Surely cats do not need five times as much repair and restoration as horses do. But cats can afford to have long periods of inactivity because they spend little time eating and are unlikely to be attacked while they sleep. Horses must spend almost all their waking hours eating, because what they eat is very low in energy value. Moreover, they cannot afford to sleep too long or too deeply, because their survival depends on their ability to run away from attackers.

Which of the following is the main idea of the passage

A. Evolution has equipped all creatures with a regular pattern of sleeping and waking.
B. The study of sleep is an important art of the evolutionary theory.
C. Sleeping patterns must be taken into consideration in the designing of robots.
D. The sleeping pattern of a living creature is determined by the food it eats.