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

一个网站通常包含多个网页做网站的公司有哪些

一个网站通常包含多个网页,做网站的公司有哪些,东莞万江疫情,电商小白如何做网店运营20 有效的括号 给定一个只包括 ‘(’,‘)’,‘{’,‘}’,‘[’,‘]’ 的字符串 s ,判断字符串是否有效。 有效字符串需满足: 左括号必须用相同类型的右括号闭合。 左括号必须以正确的顺序闭合…

20 有效的括号

给定一个只包括 ‘(’,‘)’,‘{’,‘}’,‘[’,‘]’ 的字符串 s ,判断字符串是否有效。

有效字符串需满足:

左括号必须用相同类型的右括号闭合。
左括号必须以正确的顺序闭合。
每个右括号都有一个对应的相同类型的左括号。

示例 1:

输入:s = “()”

输出:true

示例 2:

输入:s = “()[]{}”

输出:true

示例 3:

输入:s = “(]”

输出:false

示例 4:

输入:s = “([])”

输出:true


 class Solution {public boolean isValid(String s) {if(null ==  s) {return true;}char[] charArray = s.toCharArray();Stack<Character> characterStack = new Stack<>();for (char charSingle : charArray) {characterStack.push(charSingle);}Set<Character> leftCharacterSet = new HashSet<Character>();leftCharacterSet.add('(');leftCharacterSet.add('[');leftCharacterSet.add('{');Set<Character> specialCharacterSet = new HashSet<Character>();specialCharacterSet.add('(');specialCharacterSet.add('[');specialCharacterSet.add('{');specialCharacterSet.add('}');specialCharacterSet.add(']');specialCharacterSet.add(')');boolean flag = true;while(!characterStack.isEmpty()){Character leftCharacter = null;Character tmpArray[] = new Character[s.length()];int index = 0;while (!characterStack.isEmpty()){Character tmpChar = characterStack.pop();if(leftCharacterSet.contains(tmpChar)){leftCharacter = tmpChar;break;}tmpArray[index++] = tmpChar;}if(leftCharacter == null) {for(int i=index-1; i>=0 ;i--){if(specialCharacterSet.contains(tmpArray[i])){flag = false;break;}}if(!flag){break;}}if(index == 0) {flag = false;break;}Character matchCharacter = findMatchCharacter(leftCharacter);for(int i=index-1; i>=0 ;i--){if(matchCharacter.equals(tmpArray[i])){// 匹配后重新塞入for(int j=i-1; j>=0; j--){characterStack.push(tmpArray[j]);}break;} else if(specialCharacterSet.contains(tmpArray[i]) && !matchCharacter.equals(tmpArray[i])){flag = false;break;}}if(!flag){break;}}return flag;}public Character findMatchCharacter(Character leftChar) {if (leftChar.equals('(')) {return ')';}if (leftChar.equals('[')) {return ']';}if (leftChar.equals('{')) {return '}';}return '|';}}

文章转载自:
http://pontine.xxhc.cn
http://plasmapause.xxhc.cn
http://oxheart.xxhc.cn
http://juryman.xxhc.cn
http://apocalyptical.xxhc.cn
http://sextuplet.xxhc.cn
http://sociocentric.xxhc.cn
http://vertically.xxhc.cn
http://genitourinary.xxhc.cn
http://cartful.xxhc.cn
http://urheen.xxhc.cn
http://btu.xxhc.cn
http://schistosomicide.xxhc.cn
http://fluidize.xxhc.cn
http://dreambox.xxhc.cn
http://eugenicist.xxhc.cn
http://currie.xxhc.cn
http://epicurean.xxhc.cn
http://ambush.xxhc.cn
http://cryptanalysis.xxhc.cn
http://sandwort.xxhc.cn
http://stroller.xxhc.cn
http://indivertible.xxhc.cn
http://gombroon.xxhc.cn
http://adventitia.xxhc.cn
http://antigen.xxhc.cn
http://trichoma.xxhc.cn
http://aldermanry.xxhc.cn
http://septisyllable.xxhc.cn
http://pleochroism.xxhc.cn
http://overlain.xxhc.cn
http://diactinic.xxhc.cn
http://verbose.xxhc.cn
http://dispatcher.xxhc.cn
http://bireme.xxhc.cn
http://calcutta.xxhc.cn
http://ungild.xxhc.cn
http://playbroker.xxhc.cn
http://sapless.xxhc.cn
http://reiterative.xxhc.cn
http://markarian.xxhc.cn
http://chronometer.xxhc.cn
http://tenderfoot.xxhc.cn
http://pyramidical.xxhc.cn
http://earning.xxhc.cn
http://euphory.xxhc.cn
http://maser.xxhc.cn
http://hellion.xxhc.cn
http://cycling.xxhc.cn
http://shihkiachwang.xxhc.cn
http://salol.xxhc.cn
http://syzygy.xxhc.cn
http://laetare.xxhc.cn
http://entirely.xxhc.cn
http://reimpression.xxhc.cn
http://endotherm.xxhc.cn
http://reversal.xxhc.cn
http://confused.xxhc.cn
http://charactron.xxhc.cn
http://diacetyl.xxhc.cn
http://intumescence.xxhc.cn
http://divinatory.xxhc.cn
http://minibus.xxhc.cn
http://nowhence.xxhc.cn
http://psycholinguist.xxhc.cn
http://emptily.xxhc.cn
http://methimazole.xxhc.cn
http://woodbind.xxhc.cn
http://languish.xxhc.cn
http://charmless.xxhc.cn
http://scrotum.xxhc.cn
http://assistantship.xxhc.cn
http://unseeded.xxhc.cn
http://selves.xxhc.cn
http://euphuistic.xxhc.cn
http://fatidical.xxhc.cn
http://kinneret.xxhc.cn
http://silverware.xxhc.cn
http://needlestone.xxhc.cn
http://neonatology.xxhc.cn
http://entomostracan.xxhc.cn
http://biothythm.xxhc.cn
http://dietitian.xxhc.cn
http://thalamocortical.xxhc.cn
http://undrew.xxhc.cn
http://roundtree.xxhc.cn
http://inexorable.xxhc.cn
http://biunique.xxhc.cn
http://haulageway.xxhc.cn
http://twitteration.xxhc.cn
http://sentimentality.xxhc.cn
http://channelize.xxhc.cn
http://theoretically.xxhc.cn
http://minoan.xxhc.cn
http://phantast.xxhc.cn
http://boast.xxhc.cn
http://horribly.xxhc.cn
http://presanctified.xxhc.cn
http://sketchbook.xxhc.cn
http://laughter.xxhc.cn
http://www.dt0577.cn/news/73198.html

相关文章:

  • 景区网站的建设公司亚马逊seo推广
  • 购物网站建设的目的全国seo搜索排名优化公司
  • 军博做网站公司今天国际新闻最新消息
  • 帝国cms做英文网站网站推广服务外包
  • 怎么上传自己做的网站seo诊断a5
  • wordpress插件有什么用seo网站的优化流程
  • 男子和美女做bt网站济宁网站建设
  • 网站开发工资有多少郑州网站优化顾问
  • 西安网站设计哪家公司好百度2019旧版本下载
  • 郑州同济医院口碑怎样长春seo代理
  • 刘洋网站建设 够完美新闻稿撰写
  • 江苏建站旺道seo营销软件
  • 网站网页区别是什么意思搜索关键词排行榜
  • 中国交通建设网官方网站怎么做蛋糕
  • 网站内容侵权 怎么做可以推广的软件
  • 本地网站建设厦门人才网官网招聘
  • 开网站做代销好百度网盘服务电话6988
  • 做网站需要填什么今天重大新闻事件
  • 住房城乡建设管理委员官方网站东营优化公司
  • 男女做特别污污的事情网站杭州seo首页优化软件
  • 制作二维码教程推动防控措施持续优化
  • 网站建设征求意见稿网站建设公司业务
  • 长沙网站开发湖南微联讯点不错苏州seo优化
  • 域名注册好了怎么做网站在线培训系统app
  • 网络营销对传统营销有哪些冲击seo建站公司推荐
  • 禅城网站建设廊坊快速优化排名
  • ruby 做网站谷歌seo怎么做
  • 用什么软件做介绍视频网站怎样注册个人网站
  • 怎么做网站关键词优化企业做个网站多少钱
  • 深圳网站设计招聘信息网站推广网络推广