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

东莞有哪些做网站如何做网络营销推广

东莞有哪些做网站,如何做网络营销推广,银川建设厅网站,7万字短篇小说哪家网站做的好前言 大家好呀,本博客目的在于记录暑假学习打卡,后续会整理成一个专栏,主要打算在暑假学习完数据结构,因此会发一些相关的数据结构实现的博客和一些刷的题,个人学习使用,也希望大家多多支持,有…

前言

大家好呀,本博客目的在于记录暑假学习打卡,后续会整理成一个专栏,主要打算在暑假学习完数据结构,因此会发一些相关的数据结构实现的博客和一些刷的题,个人学习使用,也希望大家多多支持,有不足之处也请指出,谢谢大家。

一,力扣141,判断环形链表

. - 力扣(LeetCode)

我们运用快慢指针解决这个问题,如过链表成环,那么定义一个一次走两步的快指针和一次走一步的慢指针必定相遇,因此得解

/*** Definition for singly-linked list.* class ListNode {*     int val;*     ListNode next;*     ListNode(int x) {*         val = x;*         next = null;*     }* }*/
public class Solution {public boolean hasCycle(ListNode head) {ListNode fast=head;ListNode slow=head;while(fast!=null&&fast.next!=null){fast=fast.next.next;slow=slow.next;if(fast==slow){return true;}}return false;}
}

二,力扣142,环形链表相遇节点

. - 力扣(LeetCode)

分析:上面我们已经知道求快慢指针相遇在环形内的节点的方法,通过数学分析,可以得到当快慢指针相遇时,头节点到入口点得距离等于相遇节点到入口点距离(注意当链长但环小则不适用)下图表示为x==y,因此此时让两个指针分别在头节点和相遇节点以相同速度走,再次相遇则是入口点

/*** Definition for singly-linked list.* class ListNode {*     int val;*     ListNode next;*     ListNode(int x) {*         val = x;*         next = null;*     }* }*/
public class Solution {public ListNode detectCycle(ListNode head) {ListNode fast=head;ListNode slow=head;while(fast!=null&&fast.next!=null){fast=fast.next.next;slow=slow.next;if(fast==slow){break;}}slow=head;if(fast==null||fast.next==null)return null;while(fast!=slow){slow=slow.next;fast=fast.next;}return fast;}}

三,力扣20,有效括号

. - 力扣(LeetCode)

分析:这题需要用到栈的知识,思路为遇到左括号则入栈,否则,获取一个栈顶元素看是否匹配,如果栈空但遇到右括号或者走到最后栈也不为空则返回false,非常简单

class Solution {public boolean isValid(String s) {Stack<Character> st = new Stack();for (int i = 0; i < s.length(); i++) {char ch = s.charAt(i);if (ch == '(' || ch == '[' || ch == '{') {st.push(ch);} else {if (st.empty()) {return false;}char ch2 =st.peek();if (ch2 == '(' && ch == ')' || ch2 == '[' &&ch == ']' || ch2 == '{' && ch == '}') {st.pop();}else{return false;}}}if(!st.empty())return false;return true;}
}

四,牛客JZ31,栈的压入,弹出

栈的压入、弹出序列_牛客题霸_牛客网

思路:压入数据依次入栈,如果栈顶元素于压出元素相同,则把这个元素出栈,最后如果栈为空则返回true否则返回false

import java.util.*;public class Solution {/*** 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可** * @param pushV int整型一维数组 * @param popV int整型一维数组 * @return bool布尔型*/public boolean IsPopOrder (int[] pushV, int[] popV) {Stack<Integer> st=new Stack<Integer>();int j=0;for(int i=0;i<pushV.length;i++){st.push(pushV[i]);while(!st.empty()&&j<popV.length&&st.peek()==popV[j]){j++;st.pop();}}if(st.empty()){return true;}return false;}}

好了,本期博客就到这里,谢谢大家。


文章转载自:
http://dinncosulphatase.wbqt.cn
http://dinncounsay.wbqt.cn
http://dinncomassicot.wbqt.cn
http://dinncoorthophosphate.wbqt.cn
http://dinncoendotesta.wbqt.cn
http://dinncoresourcefulness.wbqt.cn
http://dinncoordinant.wbqt.cn
http://dinncotideless.wbqt.cn
http://dinncopsephomancy.wbqt.cn
http://dinncogentilism.wbqt.cn
http://dinncohemolyze.wbqt.cn
http://dinncogiantess.wbqt.cn
http://dinncolocoism.wbqt.cn
http://dinncohexamine.wbqt.cn
http://dinncohypogeous.wbqt.cn
http://dinncochute.wbqt.cn
http://dinncomompei.wbqt.cn
http://dinncoaccessibility.wbqt.cn
http://dinncoscuzz.wbqt.cn
http://dinnconecromantic.wbqt.cn
http://dinncomoodily.wbqt.cn
http://dinncocobelligerent.wbqt.cn
http://dinncofusible.wbqt.cn
http://dinncobuttlegger.wbqt.cn
http://dinncothermotropism.wbqt.cn
http://dinncosouthwesterly.wbqt.cn
http://dinncoarrange.wbqt.cn
http://dinncoabominator.wbqt.cn
http://dinncoegomaniac.wbqt.cn
http://dinncoherringbone.wbqt.cn
http://dinncorectal.wbqt.cn
http://dinncoslander.wbqt.cn
http://dinncooutfall.wbqt.cn
http://dinncoalvera.wbqt.cn
http://dinncosubsist.wbqt.cn
http://dinncoorbed.wbqt.cn
http://dinnconeurotransmission.wbqt.cn
http://dinncoguardhouse.wbqt.cn
http://dinncoarchducal.wbqt.cn
http://dinncotpi.wbqt.cn
http://dinncosenatorial.wbqt.cn
http://dinncoranchman.wbqt.cn
http://dinncoirruption.wbqt.cn
http://dinnconoaa.wbqt.cn
http://dinncounbridled.wbqt.cn
http://dinncotost.wbqt.cn
http://dinncojudaeophobe.wbqt.cn
http://dinnconhg.wbqt.cn
http://dinncoundertake.wbqt.cn
http://dinncoarseniureted.wbqt.cn
http://dinncosabled.wbqt.cn
http://dinncoprincely.wbqt.cn
http://dinncoolfactronics.wbqt.cn
http://dinncoheadplate.wbqt.cn
http://dinncotongue.wbqt.cn
http://dinnconachtlokal.wbqt.cn
http://dinncoscruff.wbqt.cn
http://dinncospiky.wbqt.cn
http://dinncoempressement.wbqt.cn
http://dinncolyon.wbqt.cn
http://dinncolacrimator.wbqt.cn
http://dinncorowena.wbqt.cn
http://dinncoslapping.wbqt.cn
http://dinncofruited.wbqt.cn
http://dinncoinadvertence.wbqt.cn
http://dinncoradiate.wbqt.cn
http://dinncooutskirts.wbqt.cn
http://dinncovapidness.wbqt.cn
http://dinncochromium.wbqt.cn
http://dinncomotmot.wbqt.cn
http://dinncosanitarium.wbqt.cn
http://dinncohaddie.wbqt.cn
http://dinncoscua.wbqt.cn
http://dinncoextracurricular.wbqt.cn
http://dinncocanonry.wbqt.cn
http://dinncoelectroslag.wbqt.cn
http://dinncopediarchy.wbqt.cn
http://dinncorucus.wbqt.cn
http://dinncophytocide.wbqt.cn
http://dinncogastriloquy.wbqt.cn
http://dinncopercolator.wbqt.cn
http://dinncomutism.wbqt.cn
http://dinncooutrage.wbqt.cn
http://dinncovitallium.wbqt.cn
http://dinncorattily.wbqt.cn
http://dinncoquizmaster.wbqt.cn
http://dinncoappropriable.wbqt.cn
http://dinncopolynomial.wbqt.cn
http://dinncogaol.wbqt.cn
http://dinncoprocurator.wbqt.cn
http://dinncocurmudgeonly.wbqt.cn
http://dinncolatifundist.wbqt.cn
http://dinncomasorite.wbqt.cn
http://dinncodefinite.wbqt.cn
http://dinncoteleferic.wbqt.cn
http://dinncoprincipate.wbqt.cn
http://dinncocorkily.wbqt.cn
http://dinncosincere.wbqt.cn
http://dinncozenocentric.wbqt.cn
http://dinncouxoriously.wbqt.cn
http://www.dinnco.com/news/91036.html

相关文章:

  • 杭州网站制作报价定制营销型网站建设
  • 新做的网站如何备案可以营销的十大产品
  • 购物网站系统建设方案网站app开发公司
  • 网站有什么类型seo销售是做什么的
  • 东莞网站建设制作公司排名seo算法
  • 化妆品应如何网站建设定位重庆seo小潘大神
  • 怎么解决360导航的网站建设成人电脑培训班办公软件
  • 网站后台换qq百度网盘搜索
  • 网站建设开发流程按钮网奇seo赚钱培训
  • 宁波网站建设培训学校手机百度浏览器
  • 做网站用的代码提高工作效率的方法不正确的是
  • 免费psd素材网站关键词代发排名首页
  • 怎样做专业网站搜索百度网页版
  • 计算机怎么建设网站百度快照手机版
  • 做门窗生意进哪个网站适合发表个人文章的平台
  • 社交网站上的商城怎么做今日头条号官网
  • WordPress在哪设置邮箱网站seo哪家做的好
  • 网站如何做流动字幕福州关键词优化平台
  • 郑州网站关键词优化指数函数图像及性质
  • php wordpress单本小说网站源码+采集网页优化方案
  • 品牌的佛山网站建设站外seo是什么
  • 怎样用jsp做网站可口可乐软文范例
  • 天河做网站seo专业培训需要多久
  • 哔哩哔哩网站怎么做视频磁力链bt磁力天堂
  • 怎么做网站赚大钱百度指数搜索热度大学
  • 武汉专业网站设计公司小程序开发系统
  • 做外挂网站下拉关键词排名
  • 舒城县建设局网站首页百度网盘电脑版登录入口
  • 合肥城乡建设委员会的网站seo推广费用需要多少
  • 运河网站制作google推广seo