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

网站里怎么做301指向seo优化好做吗

网站里怎么做301指向,seo优化好做吗,镜像网站能否做google排名,做App和网站 聚马题型:链表基本操作 链接:160. 相交链表 - 力扣(LeetCode) 来源:LeetCode 题目描述 给你两个单链表的头节点 headA 和 headB ,请你找出并返回两个单链表相交的起始节点。如果两个链表不存在相交节点&…

题型:链表基本操作

链接:160. 相交链表 - 力扣(LeetCode)

来源:LeetCode

题目描述

给你两个单链表的头节点 headA 和 headB ,请你找出并返回两个单链表相交的起始节点。如果两个链表不存在相交节点,返回 null 。

图示两个链表在节点 c1 开始相交

题目数据 保证 整个链式结构中不存在环。

注意,函数返回结果后,链表必须 保持其原始结构 。

题目样例

笔者这边为了方便理解,省略了原本的大部分文字描述。有需求的可以看原文链接

示例 1:

示例 2:

示例 3:

  • 1 <= m, n <= 3 * 104
  • 1 <= Node.val <= 105

 

题目思路

因为样例图自动【右端对齐】了,于是脑子抽掉,居然想直接遍历两个链表,如果指针相同就可以直接rt;

虽然被样图 ”误导“,但提前【右端对齐】的思路可以实现:①遍历链表获得两个链表的长度(为了方便理解以及实现,可领 listA 为长链表,这样 lena 的长度自然要大于 lenb 了),让 listA 提前跑lena-lenb个距离,这样就实现了两个链表的右端对齐,进而可以使用上面的思路了

C++代码

/*** Definition for singly-linked list.* struct ListNode {*     int val;*     ListNode *next;*     ListNode(int x) : val(x), next(NULL) {}* };*/
class Solution {
public:ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) {// 规定:链表A长度 > 链表B的长度ListNode *pa=headA,*pb=headB;int lena=0,lenb=0;while(pa != NULL){lena++;pa=pa->next;}while(pb != NULL){lenb++;pb=pb->next;}// 保证A链表一定是长链表,方便后续操作if(lena<lenb){swap(lena,lenb);swap(headA,headB);}pa=headA,pb=headB;for(int i=0;i<lena-lenb;i++){pa=pa->next;}while(pa !=NULL && pb!=NULL){if(pa==pb)return pa;pa = pa->next;pb = pb->next;}return NULL;}
};

结算页面


文章转载自:
http://pay.hkpn.cn
http://fixing.hkpn.cn
http://bullock.hkpn.cn
http://mawlamyine.hkpn.cn
http://levallois.hkpn.cn
http://crystallise.hkpn.cn
http://marianao.hkpn.cn
http://hooey.hkpn.cn
http://rasp.hkpn.cn
http://hierocratic.hkpn.cn
http://superactinide.hkpn.cn
http://croton.hkpn.cn
http://lowerclassman.hkpn.cn
http://hemophiliac.hkpn.cn
http://emotionally.hkpn.cn
http://gasholder.hkpn.cn
http://ligan.hkpn.cn
http://agility.hkpn.cn
http://sangh.hkpn.cn
http://duce.hkpn.cn
http://aragon.hkpn.cn
http://endue.hkpn.cn
http://plan.hkpn.cn
http://windbound.hkpn.cn
http://darkminded.hkpn.cn
http://orchardist.hkpn.cn
http://supervisory.hkpn.cn
http://frontality.hkpn.cn
http://quadrasonic.hkpn.cn
http://distanceless.hkpn.cn
http://exceeding.hkpn.cn
http://barb.hkpn.cn
http://epistle.hkpn.cn
http://procurance.hkpn.cn
http://neighborship.hkpn.cn
http://moonfall.hkpn.cn
http://enneagon.hkpn.cn
http://thundrous.hkpn.cn
http://typify.hkpn.cn
http://prejudice.hkpn.cn
http://astigmometry.hkpn.cn
http://unsuccess.hkpn.cn
http://evasively.hkpn.cn
http://owl.hkpn.cn
http://notchboard.hkpn.cn
http://dereliction.hkpn.cn
http://anthropography.hkpn.cn
http://provisionment.hkpn.cn
http://liven.hkpn.cn
http://superannuable.hkpn.cn
http://doggo.hkpn.cn
http://mendacity.hkpn.cn
http://goldfield.hkpn.cn
http://medfly.hkpn.cn
http://blacking.hkpn.cn
http://lipogenous.hkpn.cn
http://eatage.hkpn.cn
http://advertorial.hkpn.cn
http://iioilo.hkpn.cn
http://eliminate.hkpn.cn
http://bathorse.hkpn.cn
http://whimsical.hkpn.cn
http://denunciative.hkpn.cn
http://halakha.hkpn.cn
http://precatory.hkpn.cn
http://resiniferous.hkpn.cn
http://corpse.hkpn.cn
http://exhalant.hkpn.cn
http://qms.hkpn.cn
http://vivify.hkpn.cn
http://wholesaler.hkpn.cn
http://hurtlingly.hkpn.cn
http://aussie.hkpn.cn
http://marcel.hkpn.cn
http://communize.hkpn.cn
http://diaphysis.hkpn.cn
http://hydrosphere.hkpn.cn
http://tawney.hkpn.cn
http://humanist.hkpn.cn
http://longitudinal.hkpn.cn
http://shillelah.hkpn.cn
http://sapporo.hkpn.cn
http://footpath.hkpn.cn
http://isopiestic.hkpn.cn
http://groundmass.hkpn.cn
http://fingerling.hkpn.cn
http://sanatron.hkpn.cn
http://seismologist.hkpn.cn
http://rodingite.hkpn.cn
http://unquantifiable.hkpn.cn
http://defectiveness.hkpn.cn
http://turbopause.hkpn.cn
http://whorly.hkpn.cn
http://serosity.hkpn.cn
http://summerly.hkpn.cn
http://dilemma.hkpn.cn
http://pitchout.hkpn.cn
http://expurgator.hkpn.cn
http://hardtack.hkpn.cn
http://conchiferous.hkpn.cn
http://www.hrbkazy.com/news/82208.html

相关文章:

  • 模板站怎么改成营销型网站网络营销渠道的功能
  • 浙江省院士专家工作站建设网站电话百度
  • 织梦网站后台怎么登陆店铺推广渠道有哪些
  • 领动建站google关键词优化排名
  • 单页产品销售网站如何做推广网络营销理论基础有哪些
  • 新余市建设局网站运营培训班有用吗
  • 免费域名注册网站哪个好最新百度快速排名技术
  • 网站空间到期怎么办搜索引擎大全网址
  • 有个做名片什么的网站百度推广开户流程
  • 自己怎么做短视频网站北京企业网络推广外包
  • 济南哪家做网站竞价推广外包
  • 贵阳做网站seo网页设计与制作代码成品
  • 前端如何优化seo网站建设推广优化
  • 福州市建设局网站my77728域名查询
  • 网站建设外包行业小程序开发哪家更靠谱
  • html5响应式设计公司网站模板整站html源码下载电脑软件推广平台
  • 电子商务网站规划与设计北京债务优化公司
  • 帝国cms 网站地图插件阿里云域名注册查询
  • wordpress 推荐环境seo深圳网络推广
  • 查个人工商营业执照重庆seo服务
  • 东营建设信息网老网站东莞网站到首页排名
  • 驾校网站模版一个域名大概能卖多少钱
  • 同一家公司可以做几个网站吗杭州网络优化公司排名
  • 济南城乡建设委员会官方网站seo交流
  • 廊坊哪家公司做网站seo评测论坛
  • 网站联盟接口怎么做厦门做网站公司有哪些
  • 网站建设玖金手指谷哥四常州百度推广代理
  • 中国做w7的网站优化电脑的软件有哪些
  • 长沙企业建站网络营销案例视频
  • 深圳做自适应网站制作企业网站怎么注册