问题 填空题

已知序列17,18,60,40,7,32,73,65,85,采用冒泡排序法对该序列作降序排序时,第4趟的结果是 【1】

答案

参考答案:60,40,73,65,85,32,18,17,7

解析: 冒泡排序法的算法基本思想是:通过无序区中相邻记录关键字间的比较和位置交换,使关键字最小的记录如气泡一般逐渐往上“漂浮”直至“水面”。整个算法是从最下面的记录开始,对每两个相邻的关键字进行比较,且使关键字较小的记录换至关键字较大的记录之前,使得经过一趟冒泡排序后,关键字最小的记录达到最上端,接着,再在剩下的记录中找关键字最小的记录,并把它换在第二个位置上。依此类推,一直到所有记录都有序为止。根据这种思想,每趟的排序结果如下:
初始: 17,18,60:40,7,32,73,65,•85
第一趟18,60,40,17,32,73,65,85,7
第二趟60,40,18,32,73,65,85,17,7
第三趟60,40,32,73,65,85,18,17,7
第四趟60,40,73,65,85,32,18,17,7
第五趟60,73,65,85,40,32,18,17,7
第六趟73,65,85,60,40,32,18,17,7
第七趟73,85,65,60,40,32,18,17,7
第八趟85,73,65,60,40,32,18,17,7

阅读理解

Swiss International Air lines(SWISS)will introduce daily non-stop flights between Beijing and Zurich.

The new service to the financial center of Switzerland is expected to start on Dec.12,2012,which marks an expansion of services for the Chinese market.In May 2008,SWISS already started direct flights to Shanghai.

The first flight to Europe has a special price of 2,680 yuan,which does not include taxes and fuel surcharges.

“I am delighted the airlines of Switzerland can contribute to growing economic ties between the two countries with new daily flights scheduled,”says SWISS CEO Harry Hohmeister.

“We are witnessing a growing demand for tourist travel in both directions.”

Apart from Shanghai and Hong Kong,Beijing will be the third Chinese destination for SWISS.

The new route marks a return to Beijing for SWISS:the airlines previously flew to the Chinese capital as late as June 2003.

SWISS will initially operate its new daily non-stop Beijing-Zurich flights with an Airbus A340-300(219 seats)and Airbu: A330-300(236 seats)air-crafts.

The modem SWISS business class offers the most suitable comforts since the seats can be adjusted into a two-meter-long bed.

Seating firmness and softness can be adjusted thanks to air cushions.

With the introduction of the new SWISS service from Beijing,the Lufthansa Group Airlines may attract more Chinese customers when traveling to Europe.

SWISS.Lufthansa and Austrian Airlines already connect five Chinese cities with Europe and beyond.

This airlines group is the leading European airlines network in the Chinese market.

In the summer of 2011,the Lufthansa Group operated 78 weekly flights from China including Hong Kong to Europe.

SWISS is part of the Lufthansa Group as well as a member of the Star Alliance,the world's biggest airlines grouping.

小题1:According to the passage,from Dec.12,2012,      

A.it will only take us a day to fly from Beijing to Zurich

B.we can fly directly from Beijing to Zurich

C.the first flight from Beijing to Europe will only cost you 2,680 yuan

D.the direct flight to Shanghai started by SWISS will be canceled小题2:Why is the new flight added?

A.SWISS wants to offer good service to Chinese people.

B.SWISS wants to contribute to growing economic ties between the two countries

C.There is a growing demand for tourist travel in both directions.

D.SWISS wants to create more opportunity for people to work.小题3:What's special about the Airbus of the new flight?

A.The Airbus can carry more passengers than other planes.

B.The seats in it can be adjusted into comfortable beds.

C.It offers all kinds of services for passengers to choose from.

D.It has two kinds of air cushions on its seats.小题4:What's the right relation between SWISS,Lufthansa and Austrian Airlines?

A.SWISS is the customer of the Lufthansa Group Airlines

B.Austrian Airlines is a part of SWISS.

C.SWISS is part of the Lufthansa Group.

D.SWISS belongs to Austrian Airlines.小题5:What is the passage mainly about?

A.SWISS already started direct flights to Shanghai.

B.SWISS adds direct flights from Beijing to Europe.

C.Beijing will be the third Chinese destination for SWISS.

D.SWISS is the world's biggest airlines grouping.

单项选择题