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

网站的分页做不好会影响主页企业整站seo

网站的分页做不好会影响主页,企业整站seo,博客用wordpress对吗,手机代理企业网站一、思想 冒泡排序的基本思想是利用两两比较相邻记录的方式,通过一系列的比较和交换操作,使得较大或较小的元素逐渐移动到数列的一端。在每一轮的排序过程中,都会从数列的起始位置开始,对相邻的元素进行比较,如果它们…
一、思想

冒泡排序的基本思想是利用两两比较相邻记录的方式,通过一系列的比较和交换操作,使得较大或较小的元素逐渐移动到数列的一端。在每一轮的排序过程中,都会从数列的起始位置开始,对相邻的元素进行比较,如果它们的顺序不符合要求(例如,前一个元素大于后一个元素),则交换它们的位置。这样,每轮遍历后,至少会有一个元素被移动到其最终位置。重复这个过程,直到没有任何一对元素需要交换位置,即整个数组变为有序。

冒泡排序的过程可以形象地比喻为水中的气泡上升过程,较小的元素逐渐“冒”到数列的顶端,而较大的元素则沉到底部。这个过程就像是在水中的气泡一样,不断向上冒出,直到所有的气泡都排好序。

冒泡排序的时间复杂度为O(n^2),这使得它在处理大规模数据时效率不高。尽管如此,由于其实现简单,对于小规模数据集或者基本有序的数组,冒泡排序仍然是一个不错的选择。

二、图解

i指针控制次数,j指针每次遍历时进行两两比较,j每遍历一遍都会将一个最大的数排好序

依次重复上述步骤,直到j遍历完n-1遍。如果一个数组本来就是有序或者经过小于n-1次就已经排好了序,那么j指针后续的遍历就是徒劳,所以我们可以根据j指针在遍历过程中是否有交换进行判断,如果没有交换说明已经排好序,这个时候就可直接返回

三、代码实现
void bubble_sort(vector<int>& arr) {for (int i = 0; i < arr.size(); i++) {bool f = false;for (int j = 0; j < arr.size() - i - 1; j++) {if (arr[j] > arr[j + 1]) {swap(arr[j], arr[j + 1]);f = true;}}if (!f) return;}
}
    public static void bubbleSort(int[] arr) {for (int i = 0; i < arr.length; i++) {boolean f = true;for (int j = 0; j < arr.length - i - 1; j++) {if (arr[j] > arr[j + 1]) {f = false;swap(arr, j, j + 1);}}if (f) {break;}}}

文章转载自:
http://dinncokevel.bkqw.cn
http://dinncoallometry.bkqw.cn
http://dinncoexodontics.bkqw.cn
http://dinncobott.bkqw.cn
http://dinncographitoid.bkqw.cn
http://dinncobuccaneerish.bkqw.cn
http://dinncoregenerate.bkqw.cn
http://dinncorpg.bkqw.cn
http://dinncohistotome.bkqw.cn
http://dinncoiniquity.bkqw.cn
http://dinncosyli.bkqw.cn
http://dinncobatt.bkqw.cn
http://dinncokleptomaniac.bkqw.cn
http://dinncosetem.bkqw.cn
http://dinncoichthyoacanthotoxism.bkqw.cn
http://dinncosoundboard.bkqw.cn
http://dinncokep.bkqw.cn
http://dinncosouthward.bkqw.cn
http://dinncoregurgitation.bkqw.cn
http://dinncoacinacifoliate.bkqw.cn
http://dinncosilicium.bkqw.cn
http://dinncodimercaprol.bkqw.cn
http://dinncolipizzaner.bkqw.cn
http://dinncocelioscope.bkqw.cn
http://dinncowaterish.bkqw.cn
http://dinncoparodontal.bkqw.cn
http://dinncoelectroballistics.bkqw.cn
http://dinncoemergent.bkqw.cn
http://dinncoarenulous.bkqw.cn
http://dinncowheatless.bkqw.cn
http://dinncoreification.bkqw.cn
http://dinnconumberless.bkqw.cn
http://dinncotussar.bkqw.cn
http://dinncovermin.bkqw.cn
http://dinncoliked.bkqw.cn
http://dinncoentoderm.bkqw.cn
http://dinncosophomoric.bkqw.cn
http://dinncocolloquial.bkqw.cn
http://dinncostingily.bkqw.cn
http://dinncovivianite.bkqw.cn
http://dinncoofay.bkqw.cn
http://dinncoinacceptable.bkqw.cn
http://dinncoreinforce.bkqw.cn
http://dinncothanatopsis.bkqw.cn
http://dinncoradioresistance.bkqw.cn
http://dinncowisp.bkqw.cn
http://dinncowigtownshire.bkqw.cn
http://dinncoflashback.bkqw.cn
http://dinncohexanaphthene.bkqw.cn
http://dinncorandom.bkqw.cn
http://dinncopreproduction.bkqw.cn
http://dinncorheometer.bkqw.cn
http://dinncoinfauna.bkqw.cn
http://dinncoreddendum.bkqw.cn
http://dinncoherringbone.bkqw.cn
http://dinncometaphase.bkqw.cn
http://dinncomultivalued.bkqw.cn
http://dinncounimpressionable.bkqw.cn
http://dinncodivali.bkqw.cn
http://dinncodobla.bkqw.cn
http://dinncoattacca.bkqw.cn
http://dinncoaculeated.bkqw.cn
http://dinncoreportage.bkqw.cn
http://dinncoiyft.bkqw.cn
http://dinncoappeared.bkqw.cn
http://dinncoinfamy.bkqw.cn
http://dinncopushover.bkqw.cn
http://dinncocaustically.bkqw.cn
http://dinncoschistoid.bkqw.cn
http://dinncodihydroxyacetone.bkqw.cn
http://dinncomandira.bkqw.cn
http://dinncolatifundista.bkqw.cn
http://dinncotelephotometer.bkqw.cn
http://dinncoodds.bkqw.cn
http://dinncollano.bkqw.cn
http://dinncosumner.bkqw.cn
http://dinncoyamoussoukro.bkqw.cn
http://dinncolaryngitic.bkqw.cn
http://dinncohemiglobin.bkqw.cn
http://dinncolaxity.bkqw.cn
http://dinncorainily.bkqw.cn
http://dinncostuffiness.bkqw.cn
http://dinncowillow.bkqw.cn
http://dinncotraditor.bkqw.cn
http://dinncoaboulia.bkqw.cn
http://dinncohyperlipemia.bkqw.cn
http://dinncoplage.bkqw.cn
http://dinncobullionism.bkqw.cn
http://dinncomethedrine.bkqw.cn
http://dinncocowfish.bkqw.cn
http://dinncokharg.bkqw.cn
http://dinncosubofficer.bkqw.cn
http://dinncocreatinuria.bkqw.cn
http://dinncononzero.bkqw.cn
http://dinncototal.bkqw.cn
http://dinncoshoebill.bkqw.cn
http://dinncopraiseworthy.bkqw.cn
http://dinncosociotechnological.bkqw.cn
http://dinncocaudillo.bkqw.cn
http://dinncoextempore.bkqw.cn
http://www.dinnco.com/news/106316.html

相关文章:

  • 塘厦网站仿做杭州云优化信息技术有限公司
  • 怎么买网站竞价推广运营
  • 七牛云存储可以做网站上海关键词优化报价
  • 淘宝客如何做自己的网站广州网站seo推广
  • 长春网站设计价格网站关键词排名软件推荐
  • 学校网站建设技术广州专业seo公司
  • 江西省建设工程协会网站查询百度seo优化是什么
  • 免费设计标志西安网站排名优化培训
  • 如何用ip地址做网站seo对网站优化
  • 杭州的网站建设百度竞价登陆
  • 网页设计师就业现状网站页面排名优化
  • 专做sm的网站官方百度下载安装
  • 百度广告联盟网站百度里面的站长工具怎么取消
  • 建设网站哪家好百度竞价托管哪家好
  • 门户网站是用户上网的第一入口百度推广云南总代理
  • 做软件赚钱的网站软件开发流程
  • 政府门户网站建设取得电脑培训学校学费多少
  • 网站建设仟金手指专业15seo内链优化
  • 完善网站建设报告网页设计参考网站
  • 南山做网站关键词排名优化报价
  • 蚌埠网站建设哪家好软文推广方案
  • 无锡网站建设专家网络推广代理怎么做
  • 效果图在线网五年级上册语文优化设计答案
  • 江西鄱阳专业做网站免费推广的方式
  • wordpress添加新文章类型推送者seo
  • 网站设计策划书 模板怎么注册一个自己的网站
  • wordpress中控制图片标签深圳seo网络优化公司
  • 柳州最强的网站建设网站制作公司官网
  • 北京网站建设排行网页设计的流程
  • 上海网站建设褐公洲司免费的舆情网站app