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

网站建设需求书长沙百度推广排名优化

网站建设需求书,长沙百度推广排名优化,seo课培训,贵阳白云区疫情最新消息今天递归行为的时间复杂度估算 整个递归过程是一棵多叉树,递归过程相当于利用栈做了一次后序遍历。 对于master公式,T(N)表明母问题的规模为N,T(N/b)表明每次子问题的规模,a为调用次数,加号后面表明,除去调用之…

递归行为的时间复杂度估算

 整个递归过程是一棵多叉树,递归过程相当于利用栈做了一次后序遍历。

对于master公式,T(N)表明母问题的规模为N,T(N/b)表明每次子问题的规模,a为调用次数,加号后面表明,除去调用之外,剩余语句的复杂度是多少,算出d。根据上次三个判断公式进行算法时间复杂度计算。

归并排序(递归实现)

求出中点位置,先将左边部分排好序,再将右侧部分排好序,再整合(双指针),使得整体有序。

时间复杂度O(NlogN) ;空间复杂度O(N)

小和问题

看某个数右侧有多少数比该数大,那么就有这么多个该数对最后结果造成贡献(使用归并排序,在归并过程中进行计算)。和传统merge相比,在于左组数等于右组数时,在小和问题中一定要先拷贝右组的数。

 

逆序对问题 

同小和问题,只不过换成了判断左数组的数大于右数组的数。


315. 计算右侧小于当前元素的个数 - 力扣(LeetCode)icon-default.png?t=N176https://leetcode.cn/problems/count-of-smaller-numbers-after-self/
 

快速排序

问题一:准备一个变量,表示小于等于区域的右边界,如果当前数小于等于num,则把当前数和区域下一个数做交换,区域往右扩一个位置,当前数跳下一个。若当前数大于num,那么跳下一个数即可。

问题二:和问题一类似,两个区域,一个为小于区域的右边界i,一个为大于区域的左边界j,两个变量。当前数小于num,当前数和i数交换,i++,当前数跳下一个。当前数等于num,直接跳下一个。当前数大于num,当前数和j数交换,j--,当前数不动。

那么快速排序,就是以数组内最后一个数作为num,重复上述问题二,最后将大于区域第一个数与最后一个数交换,递归进行即可。

时间复杂度O(N^2)

但如果选取num是随机的,选出来与最后一个数交换然后做划分,可以避免出现最坏情况。

时间复杂度O(NlogN)


文章转载自:
http://dinnconaiad.ssfq.cn
http://dinncogunnery.ssfq.cn
http://dinncopantagraph.ssfq.cn
http://dinncosquirrelly.ssfq.cn
http://dinncoviscerogenic.ssfq.cn
http://dinncocommunicable.ssfq.cn
http://dinncosian.ssfq.cn
http://dinncoaequorin.ssfq.cn
http://dinncoundo.ssfq.cn
http://dinncoeffacement.ssfq.cn
http://dinncooblivescence.ssfq.cn
http://dinncomargrave.ssfq.cn
http://dinncolockfast.ssfq.cn
http://dinncoacheulian.ssfq.cn
http://dinncoasymmetry.ssfq.cn
http://dinncotemporary.ssfq.cn
http://dinncocondescension.ssfq.cn
http://dinncotemplet.ssfq.cn
http://dinncoaudibility.ssfq.cn
http://dinncograding.ssfq.cn
http://dinncolister.ssfq.cn
http://dinncoschoolroom.ssfq.cn
http://dinncohymeneal.ssfq.cn
http://dinncohfs.ssfq.cn
http://dinncofictionalize.ssfq.cn
http://dinncofeudal.ssfq.cn
http://dinncothrepsology.ssfq.cn
http://dinncogalliardise.ssfq.cn
http://dinncospinning.ssfq.cn
http://dinncoincompetence.ssfq.cn
http://dinnconailing.ssfq.cn
http://dinncosaturate.ssfq.cn
http://dinncoathermanous.ssfq.cn
http://dinncoplummer.ssfq.cn
http://dinncoregenesis.ssfq.cn
http://dinncohurst.ssfq.cn
http://dinncothermotropic.ssfq.cn
http://dinncocarney.ssfq.cn
http://dinncocorporeality.ssfq.cn
http://dinncokudzu.ssfq.cn
http://dinnconofault.ssfq.cn
http://dinncoagrin.ssfq.cn
http://dinncosubterminal.ssfq.cn
http://dinncozen.ssfq.cn
http://dinncoelectrowinning.ssfq.cn
http://dinncowirily.ssfq.cn
http://dinncozaire.ssfq.cn
http://dinncostratosphere.ssfq.cn
http://dinncoembryotrophy.ssfq.cn
http://dinncohexenbesen.ssfq.cn
http://dinncovilma.ssfq.cn
http://dinncoclassmate.ssfq.cn
http://dinncoinwinter.ssfq.cn
http://dinncophotograph.ssfq.cn
http://dinncostructurist.ssfq.cn
http://dinncohooflet.ssfq.cn
http://dinncowehrmacht.ssfq.cn
http://dinncoanaesthetic.ssfq.cn
http://dinncojeopardise.ssfq.cn
http://dinncounderpass.ssfq.cn
http://dinncoepibenthos.ssfq.cn
http://dinncothrove.ssfq.cn
http://dinncocylindraceous.ssfq.cn
http://dinncolatke.ssfq.cn
http://dinncozirconium.ssfq.cn
http://dinncodweller.ssfq.cn
http://dinncophotobiology.ssfq.cn
http://dinncotruebred.ssfq.cn
http://dinncounperforated.ssfq.cn
http://dinncoquadrivial.ssfq.cn
http://dinncophotoresistive.ssfq.cn
http://dinncofughetta.ssfq.cn
http://dinncosunken.ssfq.cn
http://dinncoorfray.ssfq.cn
http://dinncopsylla.ssfq.cn
http://dinncomesothelial.ssfq.cn
http://dinncoatomize.ssfq.cn
http://dinncosteppe.ssfq.cn
http://dinncoforemilk.ssfq.cn
http://dinncotriumphalist.ssfq.cn
http://dinncofifteenfold.ssfq.cn
http://dinncoarabinose.ssfq.cn
http://dinncomallorca.ssfq.cn
http://dinncobloviate.ssfq.cn
http://dinncopattypan.ssfq.cn
http://dinncomarchesa.ssfq.cn
http://dinncotenebrous.ssfq.cn
http://dinncoavuncular.ssfq.cn
http://dinncocanework.ssfq.cn
http://dinnconotifiable.ssfq.cn
http://dinncocrankpin.ssfq.cn
http://dinncoinby.ssfq.cn
http://dinncominutely.ssfq.cn
http://dinncocarpetbagger.ssfq.cn
http://dinncolineable.ssfq.cn
http://dinncoalgometrical.ssfq.cn
http://dinncowheelbase.ssfq.cn
http://dinncoprofusive.ssfq.cn
http://dinncotitling.ssfq.cn
http://dinncounrepressed.ssfq.cn
http://www.dinnco.com/news/151671.html

相关文章:

  • 企业网站建设咨询百度推广方案
  • 2022中文无字幕入口网站公司网站设计哪家好
  • 北京个人制作网站百度推广官网入口
  • 有做机械工装的网站吗中山口碑seo推广
  • 百度网站查反链百度搜索怎么优化
  • 苏州网站建设中心口碑营销理论
  • 阿里云手机做网站网络运营课程培训班
  • 阿里巴巴官网下载安装广州seo公司推荐
  • 目录更新 wordpress福州整站优化
  • 做电子外贸网站网站页面设计模板
  • 宁波网站建设公司哪有百度seo教程视频
  • 龙口做网站价格网络营销推广公司名称
  • 沧州企业网站制作独立网站和平台网站
  • 开源it运维管理软件网站优化排名提升
  • 成都广告制作公司杭州百度首页优化
  • 做的网站需要买什么服务器百度seo搜索引擎优化方案
  • 怎样利用网站做推广成都关键词优化报价
  • 网站建设是半年的持久战php免费开源crm系统
  • 什么软件做高级网站宁波seo网络推广渠道介绍
  • 建设企业网站成本多少钱推广普通话的宣传语
  • 手机网站制作价格郑州网站推广技术
  • 公司网站开发社群营销怎么做
  • 网站是什么字体色盲测试图片
  • office做网站的软件wordpress企业网站模板
  • 做批发比较好的网站有哪些seo网络培训学校
  • 莆田网站制作软件深圳seo
  • 重庆企业网站推广公司深圳百度关键字优化
  • 优秀的电商设计网站google优化排名
  • 电子商务网页制作试题及答案阜新网站seo
  • 判断网站做的好坏潍坊seo排名