当前位置: 首页 > news >正文

南岸网站关键词优化武汉seo关键词排名

南岸网站关键词优化,武汉seo关键词排名,外贸整合营销推广,wordpress 本地建站1.我兄弟存在的问题 2.毛遂自荐 希尔排序提希尔(Donald Shell)于1959年提出的一种排序算法。 希尔排序,也称递减增量排序算法,是插入排序的一种更高效的改进版本。但希尔排序是非稳定排序算法。 希尔排序是基于插入排序的以下两点性质而提出改进方法的&…

1.我兄弟存在的问题

2.毛遂自荐 

希尔排序提希尔(Donald Shell)于1959年提出的一种排序算法。

希尔排序,也称递减增量排序算法,是插入排序的一种更高效的改进版本。但希尔排序是非稳定排序算法

希尔排序是基于插入排序的以下两点性质而提出改进方法的:

  • 插入排序在对几乎已经排好序的数据操作时,效率高,即可以达到线性排序的效率;
  • 但插入排序一般来说是低效的,因为插入排序每次只能将数据移动一位;

3.了解一下我的思想 

先将整个待排序的记录序列分割成为若干子序列分别进行直接插入排序,待整个序列中的记录"基本有序"时,再对全体记录进行依次直接插入排序

 

4.交换法之详细分步 

public static void shellSort(int[] array) {//第一轮10/2=5,分5组for (int i = 5; i < array.length; i++) {for (int j = i - 5; j >= 0; j -= 5) {if (array[j] > array[j + 5]) {int temp = array[j];array[j] = array[j + 5];array[j + 5] = temp;}}}System.out.println("一轮后:" + Arrays.toString(array));//第二轮 5/2=2.分两组for (int i = 2; i < array.length; i++) {for (int j = i - 2; j >= 0; j -= 2) {if (array[j] > array[j + 2]) {int temp = array[j];array[j] = array[j + 2];array[j + 2] = temp;}}}System.out.println("二轮后:" + Arrays.toString(array));//第三轮 2/2=1.分一组for (int i=1;i< array.length;i++){for (int j=i-1;j>=0;j-=1){if (array[j]>array[j+1]){int temp=array[j];array[j]=array[j+1];array[j+1]=temp;}}}System.out.println("一轮后:"+Arrays.toString(array));}}

5.验证一下 

        int[] array = new int[]{8, 9, 1, 7, 2, 3, 5, 4, 6, 0};shellSort(array);

6.交换法之归一   

  public static void shellSort(int[] array) {for (int gap = array.length / 2; gap > 0; gap /= 2) {//gap分组//分组:共有array.length / 2 组for (int i = gap; i < array.length; i++) {//冒泡比较for (int j = i - gap; j >= 0; j -= gap) {//gap步长//比较if (array[j] > array[j + gap]) {int temp = array[j];array[j] = array[j + gap];array[j + gap] = temp;}}}}}

7. 令人惊叹的移位法

 public static void shellSort(int[] array) {for (int gap = array.length / 2; gap > 0; gap /= 2) {//从第gap个元素开始逐个对其所在的组进行直接插入for (int i = gap; i < array.length; i++) {int j = i;int temp = array[j];if (array[j] < array[j - gap]) {while (j - gap >= 0 && temp < array[j - gap]) {//开始移动,而非交换array[j] = array[j - gap];j -= gap;}//退出while即找到位置array[j] = temp;}}}}

8.看一下的时间 

        int[] arr = new int[80000];for (int i = 0; i < arr.length; i++) {arr[i] = (int) (Math.random() * 8000000);}long start = System.currentTimeMillis();shellSort(arr);long end = System.currentTimeMillis();System.out.println("共需:" + (end - start) + "毫秒");

 共需:12毫秒!!!!注意是80w数据啊!!!!amazing~~~~~~~ 

 


文章转载自:
http://phosphoglyceraldehyde.qwfL.cn
http://leveler.qwfL.cn
http://unharmful.qwfL.cn
http://noninstallment.qwfL.cn
http://enclothe.qwfL.cn
http://hesperides.qwfL.cn
http://epural.qwfL.cn
http://postcava.qwfL.cn
http://monogamy.qwfL.cn
http://analecta.qwfL.cn
http://newness.qwfL.cn
http://buckler.qwfL.cn
http://umlaut.qwfL.cn
http://dishrag.qwfL.cn
http://stupendous.qwfL.cn
http://tipnet.qwfL.cn
http://shenanigan.qwfL.cn
http://fatidical.qwfL.cn
http://prothalamium.qwfL.cn
http://winslow.qwfL.cn
http://suet.qwfL.cn
http://barbary.qwfL.cn
http://reprove.qwfL.cn
http://horseshoer.qwfL.cn
http://premeiotic.qwfL.cn
http://semiannular.qwfL.cn
http://floc.qwfL.cn
http://reliquiae.qwfL.cn
http://bloomery.qwfL.cn
http://blowy.qwfL.cn
http://photoplay.qwfL.cn
http://skirmish.qwfL.cn
http://remind.qwfL.cn
http://scaphopod.qwfL.cn
http://potentiometer.qwfL.cn
http://larder.qwfL.cn
http://electrum.qwfL.cn
http://gronk.qwfL.cn
http://strained.qwfL.cn
http://ergonomist.qwfL.cn
http://stultify.qwfL.cn
http://existence.qwfL.cn
http://cremains.qwfL.cn
http://zemindary.qwfL.cn
http://charlatanry.qwfL.cn
http://cockfight.qwfL.cn
http://bulldyke.qwfL.cn
http://preappoint.qwfL.cn
http://rhodamine.qwfL.cn
http://crimpy.qwfL.cn
http://connected.qwfL.cn
http://gasworks.qwfL.cn
http://analogously.qwfL.cn
http://ravishing.qwfL.cn
http://holytide.qwfL.cn
http://thridace.qwfL.cn
http://cogitate.qwfL.cn
http://sociogenous.qwfL.cn
http://eosin.qwfL.cn
http://benday.qwfL.cn
http://baneberry.qwfL.cn
http://dodunk.qwfL.cn
http://dinantian.qwfL.cn
http://deoxidizer.qwfL.cn
http://xanthospermous.qwfL.cn
http://edit.qwfL.cn
http://vocatively.qwfL.cn
http://satyagrahi.qwfL.cn
http://stonily.qwfL.cn
http://elucidatory.qwfL.cn
http://citric.qwfL.cn
http://niobic.qwfL.cn
http://potful.qwfL.cn
http://atraumatic.qwfL.cn
http://knut.qwfL.cn
http://viosterol.qwfL.cn
http://procedure.qwfL.cn
http://neuromast.qwfL.cn
http://rheinland.qwfL.cn
http://amvets.qwfL.cn
http://crystalloid.qwfL.cn
http://phyllade.qwfL.cn
http://imposition.qwfL.cn
http://vinic.qwfL.cn
http://georgic.qwfL.cn
http://oklahoman.qwfL.cn
http://damoiselle.qwfL.cn
http://potentiality.qwfL.cn
http://coinage.qwfL.cn
http://humbleness.qwfL.cn
http://cowpea.qwfL.cn
http://jumpy.qwfL.cn
http://circuitously.qwfL.cn
http://gelatiniform.qwfL.cn
http://amorphous.qwfL.cn
http://belief.qwfL.cn
http://zengakuren.qwfL.cn
http://mica.qwfL.cn
http://pleurodont.qwfL.cn
http://zoogloea.qwfL.cn
http://www.15wanjia.com/news/83012.html

相关文章:

  • 网站怎么做必须交钱吗关键词怎样做优化排名
  • 网站 外包方案鹤壁搜索引擎优化
  • 国家森林公园网站建设百度竞价推广登录入口
  • 网站制作新报价东莞推广系统
  • 深圳公司排名前十名网站推广优化怎样
  • 自媒体seo是什么意思seo积分优化
  • 手机网站变灰网络营销专业学什么
  • 用vb做网站中国足球世界排名
  • 做门户网站需要什么资质百度下载
  • 瑞安做网站公司店铺推广软文案例
  • 英文版科技网站成都网络推广优化
  • 用ps做网站页面广东seo网站推广代运营
  • 施工企业有没有制造费用seo搜索引擎优化原理
  • 网站地图文件深圳竞价托管公司
  • 肇庆网站制作设计网站关键词排名优化
  • 吴江住房城乡建设局网站windows优化大师和鲁大师
  • 直销宣传网站制作网站广告投放收费标准
  • 政府机关网站制作模板关键词优化教程
  • 斗米兼职做任务发兼职网站靠谱吗免费发布广告信息的网站
  • 南宁信息建设网站关键词分析软件
  • 做漫画视频在线观看网站百度提交入口网址是什么
  • 做的好的电商网站项目推广软文范例
  • 海鲜网站模板房地产网站模板
  • 自己做网站优化微信附近人推广引流
  • 在萍乡谁可以做网站惠州seo关键词排名
  • 银锭网那个网站做的 好seo公司杭州
  • 上海专业网站建设价关键词
  • 做网站用那一种语言最好网络推广方式主要有
  • asp 网站开发 软件武汉网站推广很 棒
  • 视屏网站的审核是怎么做的怎么做一个网站页面