问题 单项选择题

对长度为n的线性表进行顺序查找,在最坏情况下需要比较的次数为( )。

A.125

B.n/2

C.n

D.n+1

答案

参考答案:C

解析: 对长度为n的线性表进行顺序查找时,从表中的第一个元素开始,将给定的值与表中逐个元素的关键字进行比较,直到两者相符,查找完成。在最坏情况下,要查找的元素是表的最后一个元素或查找失败,这两种情况都需要将这个元素表中的所有元素进行比较,因此比较次数为n。

填空题
问答题

(46) Globalization might be welcomed on many grounds—the economic, political, communicational, and even linguistic ones come readily to mind but it also has some unfortunate side effects that might prove deadly to the very future of mankind. This is no mere surmise of congenital misanthropes, but the expressed fear of some who are otherwise well disposed to it. Thus Thomas Friedman, in an otherwise optimistically minded book, nevertheless, writes as follows:
(47) The more I observed the system of globalization at work, the more obvious it was that it had unleashed forest-crushing forces of development, which if left unchecked had the potential to destroy the environment and uproot culture...
(48) And because globalization as a culturally homogenizing and environment-devouring force is coming on so fast, there is real danger that in just a few decades it will wipe out the ecological and cultural diversity that took millions of years of human and biological forces to produce.
Something is as ominous as all that is a real threat indeed. (49) And yet, despite such apprehensions, Friedman and others who think like him believe that effects of this magnitude can somehow be sidestepped without interfering with the technicizing sweep of globalization. Is that merely wishful thinking or an inability to take in the full import of his own words
As Friedman points out, the globalization threat is at once to nature and to culture: to the environment and the whole ecological variety of plants and animals, as well as to the quality of human life and the cultural diversity on which it depends. Damage to nature eventually translates itself as damage to culture, and vice versa. The fate of many ancient civilizations that collapsed because they outgrew their natural resources is historical proof of that fact. Our modern civilization is subject to the same self-limiting conditions. (50) Thus, if all agriculture is reduced to an agribusiness industry, then the diversified countryside landscape that humans have created since the Neolithic revolution will become a monocultural ecological desert, for with it will disappear a host of animal and plant species as well as a whole rural way of life with its myriad varieties of folk cultures that have been carried on for millennia. The loss of natural species through the destruction of their natural habitat is paralleled step by step by the loss of cultural "species" through the elimination of their social habitat, which is rooted in a natural environment. The clearing of jungles does not merely exterminate the animals living there, but also the native people whose homes have been there for countless generations.