文件名称:shuangxiangmaobao

  • 所属分类:
  • 其他小程序
  • 资源属性:
  • [Text]
  • 上传时间:
  • 2013-12-24
  • 文件大小:
  • 1kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • 陈*
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

以整数升序排序为例来简单说明一下双向冒泡排序的过程:首先从前往后把最大数移到最后,然后反过来从后往前把最小的一个数移动到数组最前面,这一过程就是第一轮,然后重复这一过程,最终就会把整个数组从小到大排列好。双向冒泡排序要稍微优于传统的冒泡排序,因为双向排序时数组的两头都排序好了,我们只需要处理数组的中间部分即可,而单向即传统的冒泡排序只有尾部的元素是排好序的,这时每轮处理都需要从头一直处理到已经排好序元素的前面一个元素。虽然它在效率上有了点改进,但它也不能大幅度提高其排序的效率,这是由冒泡排序的基本过程所决定了的。在此基础上改进了一下,下面的代码可以实现对奇数偶数分别排序:

-Integers in ascending order as an example to explain the simple process of bidirectional bubble sort: the maximum number of front to back first to the last, and then turn back to front of the smallest number of moves to the top of the array, this process is The first round, and then repeat the process, and ultimately the entire array will be lined up from small to large. Bidirectional bubble sort to be slightly superior to the traditional bubble sort, because two-way sorting two arrays are sorted Well, we only need to deal with the middle part of the array, and the way that only the tail of the traditional elements of a bubble sort is sorted, then each round of treatment requires de novo already sorted elements have been treated to an element. While it has been point improvement in efficiency, but it can not significantly improve the efficiency of its sort, which is the basic process of bubble sort of decision. Based on this improved a bit, the following code can be achieved on odd and
(系统自动生成,下载前可以参看下载内容)

下载文件列表





shuangxiangmaobao.txt

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org