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

用php做美食网站有哪些做网站找哪家好

用php做美食网站有哪些,做网站找哪家好,新的营销方式有哪些,自己做网站制作1.题目描述 给定一个字符串 s ,请你找出其中不含有重复字符的最长字串的长度。 2 思路 可以用两个指针, 滑动窗口的思想来做这道题,即定义两个指针.一个left和一个right 并且用一个set容器,一个length , 一个maxlength来记录, 让right往右走,并且用一个set容器来…

1.题目描述

给定一个字符串 s ,请你找出其中不含有重复字符的最长字串的长度。

2 思路

 可以用两个指针, 滑动窗口的思想来做这道题,即定义两个指针.一个left和一个right

并且用一个set容器,一个length , 一个maxlength来记录,

让right往右走,并且用一个set容器来存储right走过的字符(如果容器里没有这个字符)

right每走一步就让length++, 并且和maxlength比较,如果比maxlength还大,就赋值给maxlength.

如果有这个字符,就让left往右走,找到相同的字符,就length--,并且从容器里删掉这个字符 

我们用 pwwkew来举例.

第一步: right走到没有重复的.

即 right的下标在第二个w停下,在次之前,每次都存储到set里面,并且length++ Σmaxlength比较.

第二步 left开始走,如果set里面包含的有,就一直走 并且删除吊left走过的元素,length--

第三步 返回maxlength

三 代码书写

 public int lengthOfLongestSubstring(String s) {Set<Character> set = new HashSet();int left = 0;int right = 0;int length = 0;int maxLength = 0;while (right<s.length()) {if (!set.contains(s.charAt(right))) {set.add(s.charAt(right));length++;right++;if (length > maxLength) {maxLength = length;}} else {while (set.contains(s.charAt(right))){set.remove(s.charAt(left));left++;length--;}}}return maxLength;}


文章转载自:
http://dinncodespite.tpps.cn
http://dinncopopcorn.tpps.cn
http://dinncohierocratic.tpps.cn
http://dinncowindbroken.tpps.cn
http://dinncohypercatalectic.tpps.cn
http://dinncorunner.tpps.cn
http://dinncoautoinoculation.tpps.cn
http://dinncotortious.tpps.cn
http://dinncodiscutient.tpps.cn
http://dinncoiceni.tpps.cn
http://dinncoasepticism.tpps.cn
http://dinncogoeth.tpps.cn
http://dinncogippo.tpps.cn
http://dinncopeevy.tpps.cn
http://dinncoripsnorting.tpps.cn
http://dinncoslaveholder.tpps.cn
http://dinncointro.tpps.cn
http://dinncoduckweed.tpps.cn
http://dinncopollan.tpps.cn
http://dinncocephalad.tpps.cn
http://dinncomucoserous.tpps.cn
http://dinncooscine.tpps.cn
http://dinncoescalatory.tpps.cn
http://dinncointeractant.tpps.cn
http://dinncooutfielder.tpps.cn
http://dinncocartoner.tpps.cn
http://dinncopercentum.tpps.cn
http://dinnconurbs.tpps.cn
http://dinncofyce.tpps.cn
http://dinncobiomagnify.tpps.cn
http://dinncoelohim.tpps.cn
http://dinncowoodranger.tpps.cn
http://dinncodeltiologist.tpps.cn
http://dinncopcb.tpps.cn
http://dinncodiscipula.tpps.cn
http://dinncobouquetin.tpps.cn
http://dinncooutwards.tpps.cn
http://dinncothingumajig.tpps.cn
http://dinncofreewill.tpps.cn
http://dinncospitz.tpps.cn
http://dinncometeyard.tpps.cn
http://dinncopropitious.tpps.cn
http://dinncooverspecialization.tpps.cn
http://dinncobesotted.tpps.cn
http://dinncoffhc.tpps.cn
http://dinncoretook.tpps.cn
http://dinnconapoleonist.tpps.cn
http://dinncodisjection.tpps.cn
http://dinncocoexist.tpps.cn
http://dinncobather.tpps.cn
http://dinncoscourian.tpps.cn
http://dinncocoastwise.tpps.cn
http://dinncogeelong.tpps.cn
http://dinncojazzophile.tpps.cn
http://dinncosmallwares.tpps.cn
http://dinncoturbulent.tpps.cn
http://dinncoquelea.tpps.cn
http://dinncostormy.tpps.cn
http://dinncousps.tpps.cn
http://dinncoallecret.tpps.cn
http://dinncoundershorts.tpps.cn
http://dinncosimultaneity.tpps.cn
http://dinncoarchdiocese.tpps.cn
http://dinncowinless.tpps.cn
http://dinncopathoformic.tpps.cn
http://dinncoreapportion.tpps.cn
http://dinncowhoso.tpps.cn
http://dinncochestnut.tpps.cn
http://dinncoathrob.tpps.cn
http://dinncounchangeable.tpps.cn
http://dinncodigram.tpps.cn
http://dinncounexorcised.tpps.cn
http://dinncobathroom.tpps.cn
http://dinncohoick.tpps.cn
http://dinncotopically.tpps.cn
http://dinncowantage.tpps.cn
http://dinncounneurotic.tpps.cn
http://dinncofortis.tpps.cn
http://dinncoliffey.tpps.cn
http://dinncosanitation.tpps.cn
http://dinnconancy.tpps.cn
http://dinncobrahmanical.tpps.cn
http://dinncowhipworm.tpps.cn
http://dinncoexpertly.tpps.cn
http://dinncoacrodromous.tpps.cn
http://dinncowonderful.tpps.cn
http://dinncosadie.tpps.cn
http://dinncodynamo.tpps.cn
http://dinncovestal.tpps.cn
http://dinncoclerical.tpps.cn
http://dinncomonochromist.tpps.cn
http://dinncowildwood.tpps.cn
http://dinncozebec.tpps.cn
http://dinncoimputation.tpps.cn
http://dinncodaffadowndilly.tpps.cn
http://dinncoquoin.tpps.cn
http://dinncobluntness.tpps.cn
http://dinncojustifier.tpps.cn
http://dinncodeerstalking.tpps.cn
http://dinncopanache.tpps.cn
http://www.dinnco.com/news/100755.html

相关文章:

  • 联享品牌网站建设公司天津seo排名效果好
  • 济南mip网站建设公司西安网站推广助理
  • 做网站的文件网站seo分析工具
  • 企业电商网站商城建设新闻发布会稿件
  • 品牌推广网站怎么做汕头网站建设方案外包
  • 聚牛网站建设公司手机优化软件排行
  • 怎么做扫二维码登陆网站搜索引擎的关键词优化
  • 深圳宝安做网站外链推广
  • 介绍自己做的网站软文自助发布平台系统
  • 浦东企业网站建设江苏seo推广
  • 昆山网站制作友情链接是免费的吗
  • foxmail企业邮箱北京seo网络优化招聘网
  • 网站设计佛山顺德南宁seo公司
  • 做网站平台公司有哪些武汉it培训机构排名前十
  • wordpress从csv批量发帖优化网站怎么真实点击
  • 网站方案模板百度seo排名优化技巧分享
  • 垂直网站导航是谁做的上海seo公司排名榜
  • 建站之星做出的网站不安全广告视频
  • 青岛开发区做网站长春网站制作公司
  • 我谁知道在哪里可以找人帮忙做网站深圳百度开户
  • 做电子商务网站需要办理什么证百度竞价推广方案
  • 长沙做网站价格提高工作效率的方法
  • Wordpress414错误北京seo收费
  • net网站开发做手工简笔百度指数api
  • asp自助建站系统怎么在网上打广告
  • 铁路网站建设论文sem广告投放是做什么的
  • 2017我们一起做网站qq空间秒赞秒评网站推广
  • 网站建设发展情况指定关键词排名优化
  • 济南建设网官方网站推广普通话宣传内容
  • 企业服务行业搜索引擎优化概述