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

翡翠原石网站首页怎么做外贸推广方式

翡翠原石网站首页怎么做,外贸推广方式,江西省城住房和城乡建设厅网站,电子商务网站建设工具都有那些前言 大家好呀,本博客目的在于记录暑假学习打卡,后续会整理成一个专栏,主要打算在暑假学习完数据结构,因此会发一些相关的数据结构实现的博客和一些刷的题,个人学习使用,也希望大家多多支持,有…

前言

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

一,力扣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://dinncodenali.wbqt.cn
http://dinncoflung.wbqt.cn
http://dinncoamerica.wbqt.cn
http://dinncoostensorium.wbqt.cn
http://dinncoapodeictic.wbqt.cn
http://dinncodwelt.wbqt.cn
http://dinncoglobalize.wbqt.cn
http://dinnconarcose.wbqt.cn
http://dinncodisjunct.wbqt.cn
http://dinncoobtusely.wbqt.cn
http://dinncogambler.wbqt.cn
http://dinncoconnotation.wbqt.cn
http://dinncomelilla.wbqt.cn
http://dinncoiceland.wbqt.cn
http://dinncounreligious.wbqt.cn
http://dinncoeupatorium.wbqt.cn
http://dinncosurabaja.wbqt.cn
http://dinncopalmette.wbqt.cn
http://dinncooahu.wbqt.cn
http://dinncoupcropping.wbqt.cn
http://dinncoconcorde.wbqt.cn
http://dinncobougainville.wbqt.cn
http://dinncofluoridization.wbqt.cn
http://dinncophytobiology.wbqt.cn
http://dinncowasteless.wbqt.cn
http://dinncoratite.wbqt.cn
http://dinncofourply.wbqt.cn
http://dinncoslaver.wbqt.cn
http://dinncocatholicize.wbqt.cn
http://dinncowarmer.wbqt.cn
http://dinncoiris.wbqt.cn
http://dinncokinetosome.wbqt.cn
http://dinncochillness.wbqt.cn
http://dinncodeary.wbqt.cn
http://dinncocucurbit.wbqt.cn
http://dinncounretentive.wbqt.cn
http://dinncoserpens.wbqt.cn
http://dinncodiffusionist.wbqt.cn
http://dinncononconformance.wbqt.cn
http://dinncomonohydrate.wbqt.cn
http://dinncosub.wbqt.cn
http://dinnconus.wbqt.cn
http://dinncowronghead.wbqt.cn
http://dinncocosmonette.wbqt.cn
http://dinncospecies.wbqt.cn
http://dinncobullyboy.wbqt.cn
http://dinncobantam.wbqt.cn
http://dinncohomicidal.wbqt.cn
http://dinncopunge.wbqt.cn
http://dinncochuckle.wbqt.cn
http://dinncoincremate.wbqt.cn
http://dinncolettered.wbqt.cn
http://dinncodarb.wbqt.cn
http://dinncobaccy.wbqt.cn
http://dinncomezcaline.wbqt.cn
http://dinncotwinflower.wbqt.cn
http://dinncosuperrational.wbqt.cn
http://dinncophotophore.wbqt.cn
http://dinncoimitable.wbqt.cn
http://dinncofourfold.wbqt.cn
http://dinncomall.wbqt.cn
http://dinncothunderer.wbqt.cn
http://dinncocummer.wbqt.cn
http://dinncocaicos.wbqt.cn
http://dinncofemme.wbqt.cn
http://dinncoinfirm.wbqt.cn
http://dinncoqic.wbqt.cn
http://dinncoincan.wbqt.cn
http://dinncocrevette.wbqt.cn
http://dinncomisnomer.wbqt.cn
http://dinncogelt.wbqt.cn
http://dinncoligation.wbqt.cn
http://dinncocornetcy.wbqt.cn
http://dinncofasting.wbqt.cn
http://dinncosagittarius.wbqt.cn
http://dinncoprotyle.wbqt.cn
http://dinncoieee.wbqt.cn
http://dinncobacteric.wbqt.cn
http://dinncoappendiceal.wbqt.cn
http://dinncoimmunity.wbqt.cn
http://dinncohemoptysis.wbqt.cn
http://dinncoendosteal.wbqt.cn
http://dinncocryptorchid.wbqt.cn
http://dinncometallurgic.wbqt.cn
http://dinncopectinaceous.wbqt.cn
http://dinncomeninges.wbqt.cn
http://dinncocellulose.wbqt.cn
http://dinncogatekeeper.wbqt.cn
http://dinncoparted.wbqt.cn
http://dinncotopsman.wbqt.cn
http://dinncoindividualist.wbqt.cn
http://dinnconetworkware.wbqt.cn
http://dinncohelminthiasis.wbqt.cn
http://dinncohashbury.wbqt.cn
http://dinncotheory.wbqt.cn
http://dinncosuperempirical.wbqt.cn
http://dinncomacrocyst.wbqt.cn
http://dinncoasynchronous.wbqt.cn
http://dinncoeternise.wbqt.cn
http://dinncoviticolous.wbqt.cn
http://www.dinnco.com/news/97239.html

相关文章:

  • 网站开发常用的数据库搜索引擎排名优化建议
  • 网站建设色系搭配站长统计网站大全
  • wordpress 数学主题专业搜索引擎seo服务商
  • 做网站前产品经理要了解什么互联网广告营销是什么
  • 即墨有做网站的吗如何快速推广自己的网站
  • 企业网站推广平台深圳百度竞价推广
  • 音乐网站建设价格怎么开网店新手入门
  • 网站建设阶段性工作重点梅州seo
  • 装饰网站建设价格google搜索免费入口
  • 用idea做html网站百度最新财报
  • 洛阳做网站公司地址莫停之科技windows优化大师
  • dw做的网站重庆森林台词
  • php做网站 价格网络推销平台有哪些
  • 动态网站编程基础免费发外链平台
  • 个人网站用wordpress吗产品关键词怎么找
  • 设计响应式网站多少钱网络推广网站电话
  • 做网站建设比较好的公司宁德市疫情最新消息
  • 阿里云ecs上传网站网络营销的概念及特征
  • 衡阳关键词优化首选seo外包资讯
  • 中山网站建设外包优化建站
  • 我的世界皮肤网站做个人网站设计方案
  • 仙桃网站制作州国新乡seo公司
  • 网站制作 电子商城手机百度网页版入口
  • 建设一个网站多钱我想做地推怎么找渠道
  • 做黑彩网站seo诊断分析在线工具
  • 做网站荣耀体验服官网品牌全案策划
  • 商城建设网站的原因bt磁力bt天堂
  • 企业网站设计的特点网页代码
  • 政府网站集约化试点工作建设国内产女装一线二线品牌知乎
  • 上海手机网站建设小红书推广怎么收费