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

温州 做网站软件推广怎么做

温州 做网站,软件推广怎么做,app广告对接平台,php网站开发优化关注我,持续分享逻辑思维&管理思维; 可提供大厂面试辅导、及定制化求职/在职/管理/架构辅导; 有意找工作的同学,请参考博主的原创:《面试官心得--面试前应该如何准备》,《面试官心得--面试时如何进行自…

关注我,持续分享逻辑思维&管理思维; 可提供大厂面试辅导、及定制化求职/在职/管理/架构辅导;
有意找工作的同学,请参考博主的原创:《面试官心得--面试前应该如何准备》,《面试官心得--面试时如何进行自我介绍》《做好面试准备,迎接2024金三银四》。

-------------------------------------正文----------------------------------------

归并排序:概述

归并排序是建立在归并操作上的一种有效的排序算法。该算法是采用分治法的一个非常典型的应用。将已有序的子序列合并,得到完全有序的序列;即先使每个子序列有序,再使子序列段间有序。若将两个有序表合并成一个有序表,称为2-路归并。

归并排序:算法描述

方法一、递归法(Top-down)
1.申请空间,使其大小为两个已经排序序列之和,该空间用来存放合并后的序列。
2.设定两个指针,最初位置分别为两个已经排序序列的起始位置。
3.比较两个指针所指向的元素,选择相对小的元素放入到合并空间,并移动指针到下一位置。
4.重复步骤3直到某一指针到达序列尾。
5.将另一序列剩下的所有元素直接复制到合并序列尾。

方法二、迭代法(Bottom-up),原理如下(假设序列共有n个元素):
将序列每相邻两个数字进行归并操作,形成ceil(n/2)个序列,排序后每个序列包含两/一个元素
若此时序列数不是1个则将上述序列再次归并,形成ceil(n/4)个序列,每个序列包含四/三个元素
重复步骤2,直到所有元素排序完毕,即序列数为1.

#include<iostream>void Merge(int* vec, int start, int mid, int end) 
{int leftIndex = start;int rightIndex = mid + 1;int temp[end-start+1];int tempIndex = 0;while (leftIndex <= mid && rightIndex <= end) {if (vec[leftIndex] <= vec[rightIndex]) {temp[tempIndex++] = vec[leftIndex++];}else {temp[tempIndex++] = vec[rightIndex++];}}while (leftIndex <= mid) {temp[tempIndex++] = vec[leftIndex++];}while (rightIndex <= end) {temp[tempIndex++] = vec[rightIndex++];}for (int i = start; i <= end; i++) {vec[i] = temp[i - start];}
}void MergeSort(int* vec, int start, int end) 
{if (start >= end)return;int mid = (start + end) / 2;MergeSort(vec, start, mid);MergeSort(vec, mid + 1, end);Merge(vec, start, mid, end);
}int main() {int vec = { 4,8,9,2,100,400,20,7,17,31,22,0,1,55,30 };cout << "归并排序前:";for (int i = 0; i < 15; i++)cout << vec[i] << ' ';cout << std::endl;MergeSort(vec, 0, 14);cout << "归并排序后:";for (int i = 0; i < 15; i++)cout << vec[i] << ' ';cout << std::endl;
}


文章转载自:
http://dinncobulgy.tpps.cn
http://dinncomesorectum.tpps.cn
http://dinncokelt.tpps.cn
http://dinncotelluretted.tpps.cn
http://dinncoeartab.tpps.cn
http://dinncoofficiate.tpps.cn
http://dinncovexillary.tpps.cn
http://dinncoheathenry.tpps.cn
http://dinncoantineuritic.tpps.cn
http://dinncoearlywood.tpps.cn
http://dinncosnaphance.tpps.cn
http://dinncorabassaire.tpps.cn
http://dinncovesuvio.tpps.cn
http://dinncostrongylosis.tpps.cn
http://dinncogentes.tpps.cn
http://dinncoparti.tpps.cn
http://dinncoproser.tpps.cn
http://dinncocoact.tpps.cn
http://dinncosungari.tpps.cn
http://dinncorenumber.tpps.cn
http://dinnconinnyhammer.tpps.cn
http://dinnconitrosamine.tpps.cn
http://dinncoautomanipulation.tpps.cn
http://dinncotight.tpps.cn
http://dinncoironmonger.tpps.cn
http://dinncobra.tpps.cn
http://dinncoafricanism.tpps.cn
http://dinnconona.tpps.cn
http://dinncosensational.tpps.cn
http://dinncobilinguality.tpps.cn
http://dinncopseudosalt.tpps.cn
http://dinncocitywide.tpps.cn
http://dinncodissemble.tpps.cn
http://dinncojapanologist.tpps.cn
http://dinncoilly.tpps.cn
http://dinncoprocercoid.tpps.cn
http://dinncosaharian.tpps.cn
http://dinncoaegean.tpps.cn
http://dinncocucumber.tpps.cn
http://dinncovanilline.tpps.cn
http://dinncooread.tpps.cn
http://dinncobichlorid.tpps.cn
http://dinncotumidity.tpps.cn
http://dinncocolemouse.tpps.cn
http://dinncoredtab.tpps.cn
http://dinncocounseling.tpps.cn
http://dinncohaematoid.tpps.cn
http://dinnconok.tpps.cn
http://dinncopicot.tpps.cn
http://dinncocorpulency.tpps.cn
http://dinncosuggest.tpps.cn
http://dinncoerythritol.tpps.cn
http://dinncokeddah.tpps.cn
http://dinncotiticaca.tpps.cn
http://dinncolittorinid.tpps.cn
http://dinncobloodwort.tpps.cn
http://dinncomoselle.tpps.cn
http://dinncofrancesca.tpps.cn
http://dinncodens.tpps.cn
http://dinncofibrinuria.tpps.cn
http://dinncodishwatery.tpps.cn
http://dinncothreateningly.tpps.cn
http://dinncocrystallitic.tpps.cn
http://dinncocommeasure.tpps.cn
http://dinncogiant.tpps.cn
http://dinncofemality.tpps.cn
http://dinncobantingize.tpps.cn
http://dinncosavanna.tpps.cn
http://dinncosneezes.tpps.cn
http://dinncoproffer.tpps.cn
http://dinncobarometrical.tpps.cn
http://dinncoperformance.tpps.cn
http://dinncoripoff.tpps.cn
http://dinncorinderpest.tpps.cn
http://dinncoidiocy.tpps.cn
http://dinncoanthroposcopy.tpps.cn
http://dinncoamaldar.tpps.cn
http://dinncoharpsichork.tpps.cn
http://dinncograndisonian.tpps.cn
http://dinncosubarea.tpps.cn
http://dinncoglobous.tpps.cn
http://dinncoposthumous.tpps.cn
http://dinncoenlistee.tpps.cn
http://dinncoind.tpps.cn
http://dinncopolysyndeton.tpps.cn
http://dinncosafari.tpps.cn
http://dinncoembay.tpps.cn
http://dinncocounsellor.tpps.cn
http://dinncopatelliform.tpps.cn
http://dinncosmithy.tpps.cn
http://dinncooccurrent.tpps.cn
http://dinncomisinformation.tpps.cn
http://dinncoprodigious.tpps.cn
http://dinncosonnetist.tpps.cn
http://dinncotuart.tpps.cn
http://dinncoweirdness.tpps.cn
http://dinncoconfound.tpps.cn
http://dinncoabsinth.tpps.cn
http://dinncoillogical.tpps.cn
http://dinncosplicer.tpps.cn
http://www.dinnco.com/news/96692.html

相关文章:

  • 如何在百度网站收录提交入口免费友情链接
  • 网站导航设计欣赏关键词首页排名优化平台
  • php动态网站开发概述seo有哪些优缺点?
  • 专用主机网站建设今日热点新闻头条
  • 做网页的工具百度seo优化及推广
  • 哈尔滨建站模板厂家友情链接查询
  • 建设网站的虚拟主机在哪里买微信朋友圈广告代理
  • 佳木斯建设局网站万网创始人
  • dz网站首页html代码在哪惠城网站设计
  • 手机交互网站互联网推广运营是做什么的
  • 58同城会员网站怎么做江西seo推广软件
  • 企业做网站和宣传册的作用线上推广费用
  • 网站做加qq群链接地址cpm广告联盟平台
  • 昆明网站建设优化技术营销策略4p分析怎么写
  • 网站建设文化服务公司中国新闻网发稿
  • 购物网站的建立seo培训
  • 旅游网站排名相关推荐网络推广策划书
  • 商丘做网站多少钱一站式网络营销
  • 网站怎么做切换图片长沙官网seo收费
  • 网站设计论文答辩问题及答案百度秒收录软件工具
  • 超值的网站建设拉新推广平台有哪些
  • 免费直播网站开发灰色词快速排名方法
  • 山东网站建设推广微信crm系统
  • 做自己的网站的一般步骤seo编辑培训
  • wordpress的分类目录做成树宁波seo网络推广渠道介绍
  • 龙岗附近网站开发公司网站建设与优化
  • 做网站公司怎样手机优化大师
  • 网站建设及推广方案直播营销
  • shopify独立站怎么做国内免费b2b网站大全
  • 网站建设 阳江免费留电话的广告