文件名称:Bubble
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:200.89kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
冒泡排序,依次比较相邻的两个数,将小数放在前面,大数放在后面。即在第一趟:首先比较第1个和第2个数,将小数放前,大数放后。然后比较第2个数和第3个数,将小数放前,大数放后,如此继续,直至比较最后两个数,将小数放前,大数放后。至此第一趟结束,将最大的数放到了最后。在第二趟:仍从第一对数开始比较(因为可能由于第2个数和第3个数的交换,使得第1个数不再小于第2个数),将小数放前,大数放后,一直比较到倒数第二个数(倒数第一的位置上已经是最大的),第二趟结束,在倒数第二的位置上得到一个新的最大数(其实在整个数列中是第二大的数)。如此下去,重复以上过程,直至最终完成排序。 -Bubble sort, followed by two more adjacent number on the front of the decimal, large numbers on the back. That first trip: first to compare a number 2 before the decimal, after the discharge of the large numbers. Then the comparison between the number and the number 3, the decimal put before large numbers put, so continue until the last two decimal before large numbers after release. At this point the first end of the trip, the largest number on the end. The second pass: still starting from the first logarithmic comparison (as may also be due to the second number and the third number of the exchange, so that the first number is no longer less than the number 2), the decimal Front large number put, has been compared to the reciprocal of the second number (the countdown to the first position is already the largest), the end of the second trip, to get a maximum number in the penultimate position (in fact, the entire series The second largest number). Under such circumstances, the process
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Bubble/Bubble.mdsp
Bubble/Debug/Bubble.exe
Bubble/Debug/T1.o
Bubble/T1.cpp
Bubble/Debug
Bubble
Bubble/Debug/Bubble.exe
Bubble/Debug/T1.o
Bubble/T1.cpp
Bubble/Debug
Bubble
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.