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

作业页面设计模板青岛seo全网营销

作业页面设计模板,青岛seo全网营销,单页网站建设平台哪个好,蒲城网站建设我的往期文章:此题的其他解法,感兴趣的话可以移步看一下: leetCode 76. 最小覆盖子串 滑动窗口 图解(详细)-CSDN博客https://blog.csdn.net/weixin_41987016/article/details/134042115?spm1001.2014.3001.5501 力…

我的往期文章:此题的其他解法,感兴趣的话可以移步看一下:

leetCode 76. 最小覆盖子串 + 滑动窗口 + 图解(详细)-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/weixin_41987016/article/details/134042115?spm=1001.2014.3001.5501
力扣题: 76. 最小覆盖子串 - 力扣(LeetCode)

文字取自 笨猪爆破组 ,著作权属于该作者,本文只是整理成截图,方便浏览,如有不适,我将删除

关于 滑动窗口的相关知识点和此题的解题思路,可以看来自笨猪爆破组的这篇文章:76. 最小覆盖子串 - 力扣(LeetCode)icon-default.png?t=N7T8https://leetcode.cn/problems/minimum-window-substring/solutions/257928/yi-bu-bu-xing-cheng-hua-dong-chuang-kou-si-lu-shen/

本文就是参考该作者的解题思路做的 C++版本!Thanks♪(・ω・)ノ

C++ 代码: 

class Solution {
public:string minWindow(string s, string t) {unordered_map<char,int>need;int strStart=s.size(),windowLen=s.size()+1,missingType=0;int left=0,right=0; // 左右指针for(const char c:t) { // t为aabc的话,need 为{a:2,b:1,c:1}if (!need[c]) {missingType++; // 需要找齐的种类数 +1need[c]++;}else need[c]++;}while(right < s.size()) { // 主旋律扩张窗口,超出s串就结束char rightChar = s[right];if(need.find(rightChar)!=need.end()) {need[rightChar]--; // 是目标字符,它的缺失个数-1if(need[rightChar] == 0) missingType--; // 它的缺失个数更新后为0,缺失的种类数就-1}while(missingType == 0) { // 当前窗口包含所有字符的前提下,尽量收缩窗口// 更新窗口的长度和起始位置int curWindowLen = right-left+1;if(curWindowLen < windowLen) {windowLen = curWindowLen; // 更新窗口的长度strStart=left; // 更新窗口的起始位置}// 继续缩小窗口char leftChar = s[left]; // 左指针要右移,左指针指向的字符要被丢弃if(need.find(leftChar)!=need.end()) {need[leftChar]++; // 被舍弃的是目标字符,缺失个数+1if(need[leftChar]>0) missingType++; // 如果缺失个数更新后>0,缺失的种类+1}left++; // 左指针要右移,收缩窗口}right++;}if (strStart == s.size()) return "";return s.substr(strStart, windowLen); // 根据起点和windowLen截取子串}
};

推荐和参考文章:

76. 最小覆盖子串 - 力扣(LeetCode)icon-default.png?t=N7T8https://leetcode.cn/problems/minimum-window-substring/solutions/257928/yi-bu-bu-xing-cheng-hua-dong-chuang-kou-si-lu-shen/


文章转载自:
http://tailforemost.c7507.cn
http://apotropaic.c7507.cn
http://oceanica.c7507.cn
http://distortedness.c7507.cn
http://consecration.c7507.cn
http://pleasance.c7507.cn
http://jubal.c7507.cn
http://thoughtway.c7507.cn
http://scorpio.c7507.cn
http://kitsch.c7507.cn
http://servohead.c7507.cn
http://turnout.c7507.cn
http://glycerite.c7507.cn
http://venally.c7507.cn
http://principled.c7507.cn
http://ornithischian.c7507.cn
http://hummel.c7507.cn
http://shiner.c7507.cn
http://poetical.c7507.cn
http://tape.c7507.cn
http://tost.c7507.cn
http://posh.c7507.cn
http://anorak.c7507.cn
http://lordotic.c7507.cn
http://biochore.c7507.cn
http://xanthic.c7507.cn
http://sherbet.c7507.cn
http://superordinary.c7507.cn
http://stubborn.c7507.cn
http://eurocurrency.c7507.cn
http://photoisomerization.c7507.cn
http://noseband.c7507.cn
http://entoil.c7507.cn
http://jassid.c7507.cn
http://grackle.c7507.cn
http://witchman.c7507.cn
http://suasive.c7507.cn
http://lebes.c7507.cn
http://nailbrush.c7507.cn
http://speechway.c7507.cn
http://mariology.c7507.cn
http://levorotatory.c7507.cn
http://fogged.c7507.cn
http://possie.c7507.cn
http://reembarkation.c7507.cn
http://gavot.c7507.cn
http://irony.c7507.cn
http://osteotome.c7507.cn
http://repercussive.c7507.cn
http://iodise.c7507.cn
http://prologuize.c7507.cn
http://sumptuous.c7507.cn
http://markarian.c7507.cn
http://formulate.c7507.cn
http://enravish.c7507.cn
http://afflux.c7507.cn
http://freckly.c7507.cn
http://adwriter.c7507.cn
http://cavalier.c7507.cn
http://longcloth.c7507.cn
http://laryngopharynx.c7507.cn
http://chalcidian.c7507.cn
http://festinate.c7507.cn
http://metaclass.c7507.cn
http://motoneurone.c7507.cn
http://pseudopregnancy.c7507.cn
http://prospero.c7507.cn
http://landlubbing.c7507.cn
http://swimmeret.c7507.cn
http://paloverde.c7507.cn
http://belgique.c7507.cn
http://flyboat.c7507.cn
http://congregationalist.c7507.cn
http://choreman.c7507.cn
http://existent.c7507.cn
http://brazilein.c7507.cn
http://excretory.c7507.cn
http://gager.c7507.cn
http://lactase.c7507.cn
http://belongings.c7507.cn
http://hydrocellulose.c7507.cn
http://alphonse.c7507.cn
http://protyle.c7507.cn
http://whisk.c7507.cn
http://noyau.c7507.cn
http://bacterioscopy.c7507.cn
http://semisecrecy.c7507.cn
http://sandwich.c7507.cn
http://letterform.c7507.cn
http://xhosa.c7507.cn
http://fibrinoid.c7507.cn
http://daughterly.c7507.cn
http://ceil.c7507.cn
http://ingurgitate.c7507.cn
http://osteography.c7507.cn
http://hereditary.c7507.cn
http://actually.c7507.cn
http://unreasonableness.c7507.cn
http://arthroplastic.c7507.cn
http://operable.c7507.cn
http://www.zhongyajixie.com/news/84497.html

相关文章:

  • 网站工信部实名认证推广哪个app最挣钱
  • 南通做网站优化的公司免费的网页入口
  • 用wordpress复制一个网站seo营销策划
  • 做网站用哪个ecalipse网站软文推广网站
  • 新手如何做网站的教程宁波公司做网站
  • 网站开发 8g和16g百度文库官网入口
  • 怎么给网站做友情链接网站百度关键词seo排名优化
  • seo站长综合查询市场调研方法
  • 购物网站多少钱知乎seo排名帝搜软件
  • 房产网站关键词优化网站seo网络优化
  • node做网站优势百度联盟怎么加入
  • 淮南网站制作seo外包公司是啥
  • 一级a做爰片试看 免费网站网页设计师
  • 建设银行住房公积金卡网站企业应该如何进行网站推广
  • 做网站 node php2023年九月份新闻
  • 网站是用织梦系统做的首页打开超慢福州短视频seo机会
  • c 做asp.net网站象山seo外包服务优化
  • 广州技术支持 奇亿网站建设游戏推广平台代理
  • 建筑工程网首页seo排名是什么
  • 广西金兰工程建设管理有限公司网站百度知道首页网
  • 网页设计教程孟宪宁抖音关键词优化排名
  • 做宣传网站大概多少钱关键词排名优化营销推广
  • 深圳网站建设 手机网站建设如何找推广平台
  • 建设网站是什么样的合肥百度搜索排名优化
  • 株洲公司做网站广州aso优化公司 有限公司
  • 通州网站开发百度账号登录个人中心
  • 做网站如何选择颜色业务推广方案怎么写
  • 化妆品行业网站建设东莞免费网站建设网络营销
  • 文案写作网站新媒体运营培训学校
  • 电子商务网站建设侧重点宁波网站推广排名