问题 单项选择题

如果待排序序列中两个数据元素具有相同的值,在排序后它们的位置发生颠倒,则称该排序是不稳定的。下列不稳定的排序方法是( )。

A.冒泡排序

B.归并排序

C.直接插入排序

D.直接选择排序

答案

参考答案:D

解析:排序方法有很多种,在这些排序方法中,直接插入排序、冒泡排序、归并排序和基数排序是稳定的排序方法,直接选择排序、希尔排序、快速排序和堆排序是不稳定的。

判断题
单项选择题

Americans usually consider themselves a friendly people. Their friendships, however, tend to be shorter and more casual than friendships among people from other cultures. It is not uncommon for Americans to have only one close friend during their life-time, and consider other "friends" to be just social acquaintances. This attitude probably has something to do with American mobility and the fact that Americans do not like to be dependent on other people. They tend to "compartmentalize" friendships, having "friends at work" ,"friends on the softball team", "family friends", etc.

Because the United States is a highly active society, full of movement and change, people always seem to be on the go. In this highly charged atmosphere, Americans can sometimes seem brusque or impatient. They want to get to know you as quickly as possible and then move on to something else. Sometimes, early on, they will ask you questions that you may feel are very personal. No insult is intended; the questions usually grow out of their genuine interest or curiosity, and their impatience to get to the heart of the matter. And the same goes for you. If you do not understand certain American behavior or you want to know more about them, do not hesitate to ask them questions about themselves. Americans are usually eager to explain all about their country or anything "American" in which you may be interested. So much so in fact that you may become tired of listening. It doesn’t matter, because Americans tend to be uncomfortable with silence during a conversation. They would rather talk about the weather or the latest sports scores, for example, than deal with silence.

On the other hand, don’t expect Americans to be knowledgeable about international geography or world affairs, unless those subjects directly involve the United States. Because the United States is not surrounded by many other nations, some Americans tend to ignore the rest of the world.

It can be inferred from the passage that()

A. Americans want to participate in all kinds of activities

B. Americans’ character is affected by their social and geographical environment

C. Americans do not know how to deal with silence

D. curiosity is characteristic of Americans